diff options
Diffstat (limited to 'util-linux/mdev.c')
-rw-r--r-- | util-linux/mdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index 22005aaee..17e5e88c6 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -24,7 +24,7 @@ struct globals { | |||
24 | /* mknod in /dev based on a path like "/sys/block/hda/hda1" */ | 24 | /* mknod in /dev based on a path like "/sys/block/hda/hda1" */ |
25 | static void make_device(char *path, int delete) | 25 | static void make_device(char *path, int delete) |
26 | { | 26 | { |
27 | char *device_name; | 27 | const char *device_name; |
28 | int major, minor, type, len; | 28 | int major, minor, type, len; |
29 | int mode = 0660; | 29 | int mode = 0660; |
30 | uid_t uid = 0; | 30 | uid_t uid = 0; |
@@ -46,7 +46,7 @@ static void make_device(char *path, int delete) | |||
46 | 46 | ||
47 | /* Determine device name, type, major and minor */ | 47 | /* Determine device name, type, major and minor */ |
48 | 48 | ||
49 | device_name = strrchr(path, '/') + 1; | 49 | device_name = bb_basename(path); |
50 | type = path[5]=='c' ? S_IFCHR : S_IFBLK; | 50 | type = path[5]=='c' ? S_IFCHR : S_IFBLK; |
51 | 51 | ||
52 | /* If we have a config file, look up permissions for this device */ | 52 | /* If we have a config file, look up permissions for this device */ |