Major coreutils update.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
|
||||
/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -6,8 +9,11 @@
|
||||
|
||||
extern int length_main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 2 || **(argv + 1) == '-')
|
||||
show_usage();
|
||||
printf("%lu\n", (long)strlen(argv[1]));
|
||||
return EXIT_SUCCESS;
|
||||
if ((argc != 2) || (**(++argv) == '-')) {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
bb_printf("%lu\n", (unsigned long)strlen(*argv));
|
||||
|
||||
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user