diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
commit | 4daad9004d8f07991516970a1cbd77756fae7041 (patch) | |
tree | f1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /util-linux/dmesg.c | |
parent | 1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff) | |
download | busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.bz2 busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.zip |
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'util-linux/dmesg.c')
-rw-r--r-- | util-linux/dmesg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 909cbd24e..3aa99e58f 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -38,12 +38,12 @@ int dmesg_main(int argc, char **argv) | |||
38 | 38 | ||
39 | for (in = 0; in<len;) { | 39 | for (in = 0; in<len;) { |
40 | if (last == '\n' && buf[in] == '<') in += 3; | 40 | if (last == '\n' && buf[in] == '<') in += 3; |
41 | else putchar(last = buf[in++]); | 41 | else bb_putchar(last = buf[in++]); |
42 | } | 42 | } |
43 | if (last != '\n') putchar('\n'); | 43 | if (last != '\n') bb_putchar('\n'); |
44 | } else { | 44 | } else { |
45 | write(1,buf,len); | 45 | write(1,buf,len); |
46 | if (len && buf[len-1]!='\n') putchar('\n'); | 46 | if (len && buf[len-1]!='\n') bb_putchar('\n'); |
47 | } | 47 | } |
48 | 48 | ||
49 | if (ENABLE_FEATURE_CLEAN_UP) free(buf); | 49 | if (ENABLE_FEATURE_CLEAN_UP) free(buf); |