diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-20 19:39:48 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-20 19:39:48 +0000 |
commit | c108ed549771d16a8335c1e72a7c6b3798395bac (patch) | |
tree | 757dd8f1e77e8b1838adb069b6009b934b90b92b | |
parent | 456fa6c0b17b2ff465a34db031f667b3fcd4bf2e (diff) | |
download | busybox-w32-c108ed549771d16a8335c1e72a7c6b3798395bac.tar.gz busybox-w32-c108ed549771d16a8335c1e72a7c6b3798395bac.tar.bz2 busybox-w32-c108ed549771d16a8335c1e72a7c6b3798395bac.zip |
raidautorun: new applet, by:
Thomas Jarosch (email?) and
Bernhard Fischer <rep.nop@aon.at>
-rw-r--r-- | include/applets.h | 1 | ||||
-rw-r--r-- | include/usage.h | 7 | ||||
-rw-r--r-- | miscutils/Config.in | 7 | ||||
-rw-r--r-- | miscutils/Kbuild | 1 | ||||
-rw-r--r-- | miscutils/raidautorun.c | 23 |
5 files changed, 39 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h index 0c0209676..14f6156af 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -228,6 +228,7 @@ USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER)) | |||
228 | USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 228 | USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
229 | USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER)) | 229 | USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER)) |
230 | USE_PWD(APPLET(pwd, _BB_DIR_BIN, _BB_SUID_NEVER)) | 230 | USE_PWD(APPLET(pwd, _BB_DIR_BIN, _BB_SUID_NEVER)) |
231 | USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER)) | ||
231 | USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) | 232 | USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
232 | USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 233 | USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
233 | USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) | 234 | USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
diff --git a/include/usage.h b/include/usage.h index ffd00cfc8..f9597763e 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2400,6 +2400,13 @@ USE_FEATURE_MDEV_CONFIG( \ | |||
2400 | "$ pwd\n" \ | 2400 | "$ pwd\n" \ |
2401 | "/root\n" | 2401 | "/root\n" |
2402 | 2402 | ||
2403 | #define raidautorun_trivial_usage \ | ||
2404 | "DEVICE" | ||
2405 | #define raidautorun_full_usage \ | ||
2406 | "Tells the kernel to automatically search and start RAID arrays" | ||
2407 | #define raidautorun_example_usage \ | ||
2408 | "$ raidautorun /dev/md0" | ||
2409 | |||
2403 | #define rdate_trivial_usage \ | 2410 | #define rdate_trivial_usage \ |
2404 | "[-sp] HOST" | 2411 | "[-sp] HOST" |
2405 | #define rdate_full_usage \ | 2412 | #define rdate_full_usage \ |
diff --git a/miscutils/Config.in b/miscutils/Config.in index 5d0ec8a42..e093924d7 100644 --- a/miscutils/Config.in +++ b/miscutils/Config.in | |||
@@ -284,6 +284,13 @@ config NMETER | |||
284 | help | 284 | help |
285 | nmeter prints various system parameters continuously. | 285 | nmeter prints various system parameters continuously. |
286 | 286 | ||
287 | config RAIDAUTORUN | ||
288 | bool "raidautorun" | ||
289 | default n | ||
290 | help | ||
291 | raidautorun tells the kernel md driver to | ||
292 | search and start RAID arrays. | ||
293 | |||
287 | config READAHEAD | 294 | config READAHEAD |
288 | bool "readahead" | 295 | bool "readahead" |
289 | default n | 296 | default n |
diff --git a/miscutils/Kbuild b/miscutils/Kbuild index 3173e1dab..16c76fa38 100644 --- a/miscutils/Kbuild +++ b/miscutils/Kbuild | |||
@@ -19,6 +19,7 @@ lib-$(CONFIG_MAKEDEVS) += makedevs.o | |||
19 | lib-$(CONFIG_MOUNTPOINT) += mountpoint.o | 19 | lib-$(CONFIG_MOUNTPOINT) += mountpoint.o |
20 | lib-$(CONFIG_MT) += mt.o | 20 | lib-$(CONFIG_MT) += mt.o |
21 | lib-$(CONFIG_NMETER) += nmeter.o | 21 | lib-$(CONFIG_NMETER) += nmeter.o |
22 | lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o | ||
22 | lib-$(CONFIG_READAHEAD) += readahead.o | 23 | lib-$(CONFIG_READAHEAD) += readahead.o |
23 | lib-$(CONFIG_RUNLEVEL) += runlevel.o | 24 | lib-$(CONFIG_RUNLEVEL) += runlevel.o |
24 | lib-$(CONFIG_RX) += rx.o | 25 | lib-$(CONFIG_RX) += rx.o |
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c new file mode 100644 index 000000000..c25630494 --- /dev/null +++ b/miscutils/raidautorun.c | |||
@@ -0,0 +1,23 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * raidautorun implementation for busybox | ||
4 | * | ||
5 | * Copyright (C) 2006 Bernhard Fischer | ||
6 | * | ||
7 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include "busybox.h" | ||
12 | |||
13 | #include <linux/major.h> | ||
14 | #include <linux/raid/md_u.h> | ||
15 | |||
16 | int raidautorun_main(int argc, char **argv) | ||
17 | { | ||
18 | if (ioctl(xopen(argv[1], O_RDONLY), RAID_AUTORUN, NULL) != 0) { | ||
19 | bb_perror_msg_and_die("ioctl"); | ||
20 | } | ||
21 | |||
22 | return EXIT_SUCCESS; | ||
23 | } | ||