source: MondoRescue/branches/stable/mindi-busybox/coreutils/length.c @ 821

Last change on this file since 821 was 821, checked in by Bruno Cornec, 14 years ago

Addition of busybox 1.2.1 as a mindi-busybox new package
This should avoid delivering binary files in mindi not built there (Fedora and Debian are quite serious about that)

File size: 387 bytes
Line 
1/* vi: set sw=4 ts=4: */
2
3/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
4
5#include <stdlib.h>
6#include <string.h>
7#include <stdio.h>
8#include "busybox.h"
9
10int length_main(int argc, char **argv)
11{
12    if ((argc != 2) ||  (**(++argv) == '-')) {
13        bb_show_usage();
14    }
15
16    bb_printf("%lu\n", (unsigned long)strlen(*argv));
17
18    bb_fflush_stdout_and_exit(EXIT_SUCCESS);
19}
Note: See TracBrowser for help on using the repository browser.