]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - lib.c
mdadm: improve the dlm locking mechanism for clustered raid
[thirdparty/mdadm.git] / lib.c
diff --git a/lib.c b/lib.c
index 7e44b1f27fcc23e65f287d4fdacaa8f3ecc02c7c..60890b95baf888762e0a1cf9c919e1314abf1285 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -61,7 +61,7 @@ int get_mdp_major(void)
        return mdp_major;
 }
 
-char *devid2kname(int devid)
+char *devid2kname(dev_t devid)
 {
        char path[30];
        char link[PATH_MAX];
@@ -73,8 +73,7 @@ char *devid2kname(int devid)
         * /sys/dev/block/%d:%d link which must look like
         * and take the last component.
         */
-       sprintf(path, "/sys/dev/block/%d:%d", major(devid),
-               minor(devid));
+       sprintf(path, "/sys/dev/block/%d:%d", major(devid), minor(devid));
        n = readlink(path, link, sizeof(link) - 1);
        if (n > 0) {
                link[n] = 0;
@@ -165,7 +164,7 @@ char *fd2devnm(int fd)
 
 /* When we create a new array, we don't want the content to
  * be immediately examined by udev - it is probably meaningless.
- * So create /run/mdadm/creating-FOO and expect that a udev
+ * So create /run/mdadm/creating-mdXXX and expect that a udev
  * rule will noticed this and act accordingly.
  */
 static char block_path[] = "/run/mdadm/creating-%s";