diff options
author | NeilBrown <neilb@suse.de> | 2012-05-03 06:16:51 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-03 06:16:51 +0200 |
commit | 5ffdc2dd443d363b790c0ab9171a0b3265cb6fce (patch) | |
tree | 616d8ae60611b1928688c7388fc3016f16a698ce /mdopen.c | |
parent | imsm: fix: thunderdome may drop 2tb attribute (diff) | |
download | mdadm-5ffdc2dd443d363b790c0ab9171a0b3265cb6fce.tar.xz mdadm-5ffdc2dd443d363b790c0ab9171a0b3265cb6fce.zip |
Update test for "is udev active".
Newer udev doesn't use /dev/.udev any more. it used
/run/udev instead.
So test for that as well.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r-- | mdopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -321,7 +321,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 || + if ((stat("/dev/.udev", &stb) != 0 && stat("/run/udev", &stb) != 0) || check_env("MDADM_NO_UDEV")) { /* Make sure 'devname' exists and 'chosen' is a symlink to it */ if (lstat(devname, &stb) == 0) { |