Annotation of /tags/mkinitrd-6_1_3/busybox/coreutils/length.c
Parent Directory | Revision Log
Revision 816 -
(hide annotations)
(download)
Fri Apr 24 18:33:46 2009 UTC (15 years, 2 months ago) by niro
Original Path: trunk/mkinitrd-magellan/busybox/coreutils/length.c
File MIME type: text/plain
File size: 408 byte(s)
Fri Apr 24 18:33:46 2009 UTC (15 years, 2 months ago) by niro
Original Path: trunk/mkinitrd-magellan/busybox/coreutils/length.c
File MIME type: text/plain
File size: 408 byte(s)
-updated to busybox-1.13.4
1 | niro | 532 | /* vi: set sw=4 ts=4: */ |
2 | |||
3 | /* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */ | ||
4 | |||
5 | niro | 816 | #include "libbb.h" |
6 | niro | 532 | |
7 | niro | 816 | /* This is a NOFORK applet. Be very careful! */ |
8 | |||
9 | int length_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | ||
10 | niro | 532 | int length_main(int argc, char **argv) |
11 | { | ||
12 | niro | 816 | if ((argc != 2) || (**(++argv) == '-')) { |
13 | bb_show_usage(); | ||
14 | niro | 532 | } |
15 | |||
16 | niro | 816 | printf("%u\n", (unsigned)strlen(*argv)); |
17 | niro | 532 | |
18 | niro | 816 | return fflush(stdout); |
19 | niro | 532 | } |