Contents of /tags/mkinitrd-6_1_5/busybox/coreutils/length.c
Parent Directory | Revision Log
Revision 899 -
(show annotations)
(download)
Wed Aug 5 17:52:52 2009 UTC (15 years, 1 month ago) by niro
File MIME type: text/plain
File size: 408 byte(s)
Wed Aug 5 17:52:52 2009 UTC (15 years, 1 month ago) by niro
File MIME type: text/plain
File size: 408 byte(s)
tagged 'mkinitrd-6_1_5'
1 | /* vi: set sw=4 ts=4: */ |
2 | |
3 | /* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */ |
4 | |
5 | #include "libbb.h" |
6 | |
7 | /* This is a NOFORK applet. Be very careful! */ |
8 | |
9 | int length_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
10 | int length_main(int argc, char **argv) |
11 | { |
12 | if ((argc != 2) || (**(++argv) == '-')) { |
13 | bb_show_usage(); |
14 | } |
15 | |
16 | printf("%u\n", (unsigned)strlen(*argv)); |
17 | |
18 | return fflush(stdout); |
19 | } |