summaryrefslogtreecommitdiffstats
path: root/urunlevel/my_linux/man.c
diff options
context:
space:
mode:
Diffstat (limited to 'urunlevel/my_linux/man.c')
-rw-r--r--urunlevel/my_linux/man.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/urunlevel/my_linux/man.c b/urunlevel/my_linux/man.c
new file mode 100644
index 0000000..162cac8
--- /dev/null
+++ b/urunlevel/my_linux/man.c
@@ -0,0 +1,41 @@
1/*
2 * Mini man implementation for busybox.
3 *
4 * Copyright (C) 2004 by David Seikel won_fang@yahoo.com.au
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 * 02111-1307 USA
20 *
21 */
22
23#include <unistd.h>
24
25#include "busybox.h"
26#include "lib_init_d.h"
27#include "my_linux.h"
28
29
30int man_main(int argc, char **argv)
31{
32 argv += optind;
33 if (!*argv)
34 {
35 bb_printf("\nThe following manual topics are available:\n");
36 doit(NOFORK, "ls -m /usr/doc");
37 }
38 else
39 doit(NOFORK, "less /usr/doc/%s", *argv);
40 return EXIT_SUCCESS;
41}