]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdopen.c
Mdmonitor: Improve udev event handling
[thirdparty/mdadm.git] / mdopen.c
index 3daa71f99de818ddfdcfe7a51fcd3c363d62e014..f9b04e1cfb0ec6786e3a553ebe9d4900706e3af3 100644 (file)
--- a/mdopen.c
+++ b/mdopen.c
@@ -23,6 +23,7 @@
  */
 
 #include "mdadm.h"
+#include "udev.h"
 #include "md_p.h"
 #include <ctype.h>
 
@@ -176,7 +177,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
        char devnm[32];
        char cbuf[400];
 
-       if (!use_udev())
+       if (!udev_is_available())
                block_udev = 0;
 
        if (chosen == NULL)
@@ -384,7 +385,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 (!use_udev()) {
+       if (!udev_is_available()) {
                /* Make sure 'devname' exists and 'chosen' is a symlink to it */
                if (lstat(devname, &stb) == 0) {
                        /* Must be the correct device, else error */
@@ -508,7 +509,7 @@ char *find_free_devnm(int use_partitions)
                        continue;
                if (!conf_name_is_free(devnm))
                        continue;
-               if (!use_udev()) {
+               if (!udev_is_available()) {
                        /* make sure it is new to /dev too, at least as a
                         * non-standard */
                        dev_t devid = devnm2devid(devnm);