Displaying 4 results from an estimated 4 matches for "mdpminorshift".
2006 May 08
1
create_dev and raid
...@@
snprintf(name, sizeof name,
"/dev/md%s%d", partitioned?"_d":"", dev_minor);
+ if (!stat(name,&st)) continue;
+
if (partitioned)
dev = makedev(mdp_major(), dev_minor << MdpMinorShift);
else
2006 May 10
1
[patch] skip existing md devices
...partitioned = md_setup_args[ent].partitioned;
@@ -230,6 +231,9 @@
snprintf(name, sizeof name,
"/dev/md%s%d", partitioned?"_d":"", dev_minor);
+ if (stat(name,&st) == 0)
+ continue;
+
if (partitioned)
dev = makedev(mdp_major(), dev_minor << MdpMinorShift);
else
2007 Dec 11
0
[git patch] kinit fix, header install cleanup
...ed;
@@ -235,6 +236,9 @@ static void md_setup_drive(void)
snprintf(name, sizeof name,
"/dev/md%s%d", partitioned ? "_d" : "", dev_minor);
+ if (stat(name, &st_chk) == 0)
+ continue;
+
if (partitioned)
dev = makedev(mdp_major(), dev_minor << MdpMinorShift);
else
2008 Mar 25
2
bunch of small fixes
...ed;
@@ -235,6 +236,9 @@ static void md_setup_drive(void)
snprintf(name, sizeof name,
"/dev/md%s%d", partitioned ? "_d" : "", dev_minor);
+ if (stat(name, &st_chk) == 0)
+ continue;
+
if (partitioned)
dev = makedev(mdp_major(), dev_minor << MdpMinorShift);
else