summaryrefslogtreecommitdiffstats
path: root/mdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mdopen.c b/mdopen.c
index f9b04e1c..eaa59b59 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -336,8 +336,8 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
devnm[0] = 0;
if (num < 0 && cname && ci->names) {
sprintf(devnm, "md_%s", cname);
- if (block_udev)
- udev_block(devnm);
+ if (block_udev && udev_block(devnm) != UDEV_STATUS_SUCCESS)
+ return -1;
if (!create_named_array(devnm)) {
devnm[0] = 0;
udev_unblock();
@@ -345,8 +345,8 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
}
if (num >= 0) {
sprintf(devnm, "md%d", num);
- if (block_udev)
- udev_block(devnm);
+ if (block_udev && udev_block(devnm) != UDEV_STATUS_SUCCESS)
+ return -1;
if (!create_named_array(devnm)) {
devnm[0] = 0;
udev_unblock();
@@ -369,8 +369,8 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
return -1;
}
}
- if (block_udev)
- udev_block(devnm);
+ if (block_udev && udev_block(devnm) != UDEV_STATUS_SUCCESS)
+ return -1;
create_named_array(devnm);
}