Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/coreutils/length.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 381 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

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
10 int length_main(int argc, char **argv)
11 {
12 if ((argc != 2) || (**(++argv) == '-')) {
13 bb_show_usage();
14 }
15
16 printf("%lu\n", (unsigned long)strlen(*argv));
17
18 fflush_stdout_and_exit(EXIT_SUCCESS);
19 }