]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdopen.c
Use dev_t for devnm2devid and devid2devnm
[thirdparty/mdadm.git] / mdopen.c
index 28410f467f95010379af600a5254354383e8e733..e71d7586cf79d36023eed8beaf45d62af8aaaf01 100644 (file)
--- a/mdopen.c
+++ b/mdopen.c
@@ -348,7 +348,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
                if (lstat(devname, &stb) == 0) {
                        /* Must be the correct device, else error */
                        if ((stb.st_mode&S_IFMT) != S_IFBLK ||
-                           stb.st_rdev != (dev_t)devnm2devid(devnm)) {
+                           stb.st_rdev != devnm2devid(devnm)) {
                                pr_err("%s exists but looks wrong, please fix\n",
                                        devname);
                                return -1;
@@ -452,7 +452,7 @@ char *find_free_devnm(int use_partitions)
                if (!use_udev()) {
                        /* make sure it is new to /dev too, at least as a
                         * non-standard */
-                       int devid = devnm2devid(devnm);
+                       dev_t devid = devnm2devid(devnm);
                        if (devid) {
                                char *dn = map_dev(major(devid),
                                                   minor(devid), 0);