diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-30 08:04:05 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-30 08:04:05 +0000 |
commit | dc757aa16ce53d9784fa3953b0c3762dfa8ccda9 (patch) | |
tree | 2eee7a83dcbd38fcfbcdbec8b5d52f4baff3326f /util-linux | |
parent | f7d07b1723c15ee818f0c1f5cce96c55274024a6 (diff) | |
download | busybox-w32-dc757aa16ce53d9784fa3953b0c3762dfa8ccda9.tar.gz busybox-w32-dc757aa16ce53d9784fa3953b0c3762dfa8ccda9.tar.bz2 busybox-w32-dc757aa16ce53d9784fa3953b0c3762dfa8ccda9.zip |
introduce and use bb_basename()
function old new delta
bb_basename - 26 +26
sv_main 1226 1225 -1
passwd_main 1985 1983 -2
showdirs 482 478 -4
sendCgi 1811 1807 -4
make_device 1354 1350 -4
handleIncoming 2443 2439 -4
func_name 82 78 -4
service_name 2292 2285 -7
main 909 901 -8
cmp_main 555 547 -8
test_main 434 422 -12
act 228 216 -12
find_pair 180 164 -16
rmmod_main 298 280 -18
find_pid_by_name 156 134 -22
modprobe_main 1606 1576 -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes
text data bss dec hex filename
734933 3028 14400 752361 b7ae9 busybox_old
734801 3028 14400 752229 b7a65 busybox_unstripped
Diffstat (limited to 'util-linux')
-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 */ |