summaryrefslogtreecommitdiff
path: root/mdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mdopen.c b/mdopen.c
index 24188df6..462743c4 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -330,8 +330,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
* If we cannot detect udev, we need to make
* devices and links ourselves.
*/
- if ((stat("/dev/.udev", &stb) != 0 && stat("/run/udev", &stb) != 0) ||
- check_env("MDADM_NO_UDEV")) {
+ if (!use_udev()) {
/* Make sure 'devname' exists and 'chosen' is a symlink to it */
if (lstat(devname, &stb) == 0) {
/* Must be the correct device, else error */