diff options
author | Denis Vlasenko | 2007-06-30 08:04:05 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-06-30 08:04:05 +0000 |
commit | dc757aa16ce53d9784fa3953b0c3762dfa8ccda9 (patch) | |
tree | 2eee7a83dcbd38fcfbcdbec8b5d52f4baff3326f /libbb | |
parent | f7d07b1723c15ee818f0c1f5cce96c55274024a6 (diff) | |
download | busybox-dc757aa16ce53d9784fa3953b0c3762dfa8ccda9.zip busybox-dc757aa16ce53d9784fa3953b0c3762dfa8ccda9.tar.gz |
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 'libbb')
-rw-r--r-- | libbb/Kbuild | 1 | ||||
-rw-r--r-- | libbb/find_pid_by_name.c | 8 | ||||
-rw-r--r-- | libbb/lineedit.c | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/libbb/Kbuild b/libbb/Kbuild index 693f609..ecd50a6 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -8,6 +8,7 @@ lib-y:= lib-y += ask_confirmation.o lib-y += bb_askpass.o +lib-y += bb_basename.o lib-y += bb_do_delay.o lib-y += bb_pwd.o lib-y += bb_strtonum.o diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c index cfc5b34..1fafec8 100644 --- a/libbb/find_pid_by_name.c +++ b/libbb/find_pid_by_name.c @@ -38,14 +38,6 @@ execXXX("/proc/self/exe", applet_name, params....) and therefore comm field contains "exe". */ -static const char *bb_basename(const char *name) -{ - const char *cp = strrchr(name, '/'); - if (cp) - return cp + 1; - return name; -} - /* find_pid_by_name() * * Modified by Vladimir Oleynik for use with libbb/procps.c diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 1f2e6a5..62f8949 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1156,7 +1156,7 @@ static void parse_prompt(const char *prmt_ptr) #endif case 'W': pbuf = pwd_buf; - cp = strrchr(pbuf,'/'); + cp = strrchr(pbuf, '/'); if (cp != NULL && cp != pbuf) pbuf += (cp-pbuf) + 1; break; |