diff options
author | Erik Andersen <andersen@codepoet.org> | 1999-12-15 22:14:12 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 1999-12-15 22:14:12 +0000 |
commit | 6f23cec5d081fac63a7a0c493d6caff77e55dfb1 (patch) | |
tree | 237dbf5039738e52cd7f6a3ada0ee9c03eccc01c | |
parent | 935fb3886fc9bb91266275236da1edd5b2b6c2d9 (diff) | |
download | busybox-w32-6f23cec5d081fac63a7a0c493d6caff77e55dfb1.tar.gz busybox-w32-6f23cec5d081fac63a7a0c493d6caff77e55dfb1.tar.bz2 busybox-w32-6f23cec5d081fac63a7a0c493d6caff77e55dfb1.zip |
Added lsmod
-Erik
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | applets/busybox.c | 3 | ||||
-rw-r--r-- | busybox.c | 3 | ||||
-rw-r--r-- | busybox.def.h | 1 | ||||
-rw-r--r-- | internal.h | 5 | ||||
-rw-r--r-- | lsmod.c | 35 | ||||
-rw-r--r-- | modutils/lsmod.c | 35 |
7 files changed, 83 insertions, 2 deletions
@@ -1,6 +1,9 @@ | |||
1 | 0.40 | 1 | 0.40 |
2 | * Added the -s option to du -beppu | 2 | * Added the -s option to du -beppu |
3 | * Fixed an embarrasing segfault in head -beppu | 3 | * Fixed an embarrasing segfault in head -beppu |
4 | * New App: lsmod -erik | ||
5 | |||
6 | -Erik Andersen | ||
4 | 7 | ||
5 | 0.39 | 8 | 0.39 |
6 | * New Apps: ping, hostname, and mkfifo contributed by Randolph Chung | 9 | * New Apps: ping, hostname, and mkfifo contributed by Randolph Chung |
diff --git a/applets/busybox.c b/applets/busybox.c index 4d676e7c0..4967e5fa3 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
@@ -105,6 +105,9 @@ static const struct Applet applets[] = { | |||
105 | #ifdef BB_LS //bin | 105 | #ifdef BB_LS //bin |
106 | {"ls", ls_main}, | 106 | {"ls", ls_main}, |
107 | #endif | 107 | #endif |
108 | #ifdef BB_LSMOD //sbin | ||
109 | {"lsmod", lsmod_main}, | ||
110 | #endif | ||
108 | #ifdef BB_MAKEDEVS //sbin | 111 | #ifdef BB_MAKEDEVS //sbin |
109 | {"makedevs", makedevs_main}, | 112 | {"makedevs", makedevs_main}, |
110 | #endif | 113 | #endif |
@@ -105,6 +105,9 @@ static const struct Applet applets[] = { | |||
105 | #ifdef BB_LS //bin | 105 | #ifdef BB_LS //bin |
106 | {"ls", ls_main}, | 106 | {"ls", ls_main}, |
107 | #endif | 107 | #endif |
108 | #ifdef BB_LSMOD //sbin | ||
109 | {"lsmod", lsmod_main}, | ||
110 | #endif | ||
108 | #ifdef BB_MAKEDEVS //sbin | 111 | #ifdef BB_MAKEDEVS //sbin |
109 | {"makedevs", makedevs_main}, | 112 | {"makedevs", makedevs_main}, |
110 | #endif | 113 | #endif |
diff --git a/busybox.def.h b/busybox.def.h index cbee4f651..fcd185aa7 100644 --- a/busybox.def.h +++ b/busybox.def.h | |||
@@ -35,6 +35,7 @@ | |||
35 | //#define BB_LOADKMAP | 35 | //#define BB_LOADKMAP |
36 | #define BB_LOGGER | 36 | #define BB_LOGGER |
37 | #define BB_LS | 37 | #define BB_LS |
38 | #define BB_LSMOD | ||
38 | //#define BB_MAKEDEVS | 39 | //#define BB_MAKEDEVS |
39 | //#define BB_MATH | 40 | //#define BB_MATH |
40 | #define BB_MKDIR | 41 | #define BB_MKDIR |
diff --git a/internal.h b/internal.h index 3cf777418..371728dd7 100644 --- a/internal.h +++ b/internal.h | |||
@@ -58,9 +58,11 @@ extern int more_main(int argc, char** argv); | |||
58 | extern int cp_main(int argc, char** argv); | 58 | extern int cp_main(int argc, char** argv); |
59 | extern int chmod_chown_chgrp_main(int argc, char** argv); | 59 | extern int chmod_chown_chgrp_main(int argc, char** argv); |
60 | extern int chroot_main(int argc, char** argv); | 60 | extern int chroot_main(int argc, char** argv); |
61 | extern int chvt_main(int argc, char** argv); | ||
61 | extern int clear_main(int argc, char** argv); | 62 | extern int clear_main(int argc, char** argv); |
62 | extern int date_main(int argc, char** argv); | 63 | extern int date_main(int argc, char** argv); |
63 | extern int dd_main(int argc, char** argv); | 64 | extern int dd_main(int argc, char** argv); |
65 | extern int deallocvt_main(int argc, char** argv); | ||
64 | extern int df_main(int argc, char** argv); | 66 | extern int df_main(int argc, char** argv); |
65 | extern int dmesg_main(int argc, char** argv); | 67 | extern int dmesg_main(int argc, char** argv); |
66 | extern int du_main(int argc, char** argv); | 68 | extern int du_main(int argc, char** argv); |
@@ -83,8 +85,7 @@ extern int loadfont_main(int argc, char** argv); | |||
83 | extern int loadkmap_main(int argc, char** argv); | 85 | extern int loadkmap_main(int argc, char** argv); |
84 | extern int losetup_main(int argc, char** argv); | 86 | extern int losetup_main(int argc, char** argv); |
85 | extern int ls_main(int argc, char** argv); | 87 | extern int ls_main(int argc, char** argv); |
86 | extern int chvt_main(int argc, char** argv); | 88 | extern int lsmod_main(int argc, char** argv); |
87 | extern int deallocvt_main(int argc, char** argv); | ||
88 | extern int makedevs_main(int argc, char** argv); | 89 | extern int makedevs_main(int argc, char** argv); |
89 | extern int math_main(int argc, char** argv); | 90 | extern int math_main(int argc, char** argv); |
90 | extern int mkdir_main(int argc, char** argv); | 91 | extern int mkdir_main(int argc, char** argv); |
diff --git a/lsmod.c b/lsmod.c new file mode 100644 index 000000000..1696f756e --- /dev/null +++ b/lsmod.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Mini lsmod implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include "internal.h" | ||
24 | #include <stdio.h> | ||
25 | |||
26 | |||
27 | #if ! defined BB_FEATURE_USE_PROCFS | ||
28 | #error Sorry, I depend on the /proc filesystem right now. | ||
29 | #endif | ||
30 | |||
31 | extern int lsmod_main(int argc, char **argv) | ||
32 | { | ||
33 | char* cmd[] = { "cat", "/proc/modules", "\0" }; | ||
34 | exit(cat_main( 3, cmd)); | ||
35 | } | ||
diff --git a/modutils/lsmod.c b/modutils/lsmod.c new file mode 100644 index 000000000..1696f756e --- /dev/null +++ b/modutils/lsmod.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Mini lsmod implementation for busybox | ||
3 | * | ||
4 | * Copyright (C) 1999 by Lineo, inc. | ||
5 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include "internal.h" | ||
24 | #include <stdio.h> | ||
25 | |||
26 | |||
27 | #if ! defined BB_FEATURE_USE_PROCFS | ||
28 | #error Sorry, I depend on the /proc filesystem right now. | ||
29 | #endif | ||
30 | |||
31 | extern int lsmod_main(int argc, char **argv) | ||
32 | { | ||
33 | char* cmd[] = { "cat", "/proc/modules", "\0" }; | ||
34 | exit(cat_main( 3, cmd)); | ||
35 | } | ||