chiark / gitweb /
[PATCH] udev - fix debug info for multiple rule file config
[elogind.git] / udev-add.c
index 2f64b4375ab8019409f289f48b4cb2cd22f14171..3a72c544b8b9b20af53c61153c6b4e3aee579bda 100644 (file)
@@ -211,7 +211,8 @@ static int create_node(struct udevice *dev, int fake)
                info("creating device partition nodes '%s[1-%i]'", filename, dev->partitions);
                if (!fake) {
                        for (i = 1; i <= dev->partitions; i++) {
-                               sprintf(partitionname, "%s%i", filename, i);
+                               strfieldcpy(partitionname, filename);
+                               strintcat(partitionname, i);
                                make_node(partitionname, dev->major,
                                          dev->minor + i, dev->mode, uid, gid);
                        }
@@ -251,8 +252,6 @@ static int create_node(struct udevice *dev, int fake)
                                i++;
                        }
 
-                       if (linktarget[0] == '\0')
-                               strfieldcpy(linktarget, "./");
                        strfieldcat(linktarget, &dev->name[tail]);
 
                        /* unlink existing files to ensure that our symlink is created */