Annotation of /trunk/mkinitrd-magellan/busybox/coreutils/yes.c
Parent Directory | Revision Log
Revision 984 -
(hide annotations)
(download)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File MIME type: text/plain
File size: 823 byte(s)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File MIME type: text/plain
File size: 823 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 | niro | 532 | /* vi: set sw=4 ts=4: */ |
2 | /* | ||
3 | * yes implementation for busybox | ||
4 | * | ||
5 | * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
8 | */ | ||
9 | |||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | ||
11 | |||
12 | /* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org) | ||
13 | * | ||
14 | * Size reductions and removed redundant applet name prefix from error messages. | ||
15 | */ | ||
16 | |||
17 | niro | 816 | #include "libbb.h" |
18 | niro | 532 | |
19 | niro | 816 | /* This is a NOFORK applet. Be very careful! */ |
20 | |||
21 | int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | ||
22 | niro | 984 | int yes_main(int argc UNUSED_PARAM, char **argv) |
23 | niro | 532 | { |
24 | niro | 816 | char **pp; |
25 | niro | 532 | |
26 | niro | 816 | argv[0] = (char*)"y"; |
27 | niro | 984 | if (argv[1]) |
28 | niro | 532 | ++argv; |
29 | |||
30 | do { | ||
31 | niro | 816 | pp = argv; |
32 | while (1) { | ||
33 | fputs(*pp, stdout); | ||
34 | if (!*++pp) | ||
35 | break; | ||
36 | putchar(' '); | ||
37 | } | ||
38 | niro | 532 | } while (putchar('\n') != EOF); |
39 | |||
40 | bb_perror_nomsg_and_die(); | ||
41 | } |