aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-20 19:39:48 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-20 19:39:48 +0000
commitc108ed549771d16a8335c1e72a7c6b3798395bac (patch)
tree757dd8f1e77e8b1838adb069b6009b934b90b92b /miscutils
parent456fa6c0b17b2ff465a34db031f667b3fcd4bf2e (diff)
downloadbusybox-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>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/Config.in7
-rw-r--r--miscutils/Kbuild1
-rw-r--r--miscutils/raidautorun.c23
3 files changed, 31 insertions, 0 deletions
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
287config RAIDAUTORUN
288 bool "raidautorun"
289 default n
290 help
291 raidautorun tells the kernel md driver to
292 search and start RAID arrays.
293
287config READAHEAD 294config 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
19lib-$(CONFIG_MOUNTPOINT) += mountpoint.o 19lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
20lib-$(CONFIG_MT) += mt.o 20lib-$(CONFIG_MT) += mt.o
21lib-$(CONFIG_NMETER) += nmeter.o 21lib-$(CONFIG_NMETER) += nmeter.o
22lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
22lib-$(CONFIG_READAHEAD) += readahead.o 23lib-$(CONFIG_READAHEAD) += readahead.o
23lib-$(CONFIG_RUNLEVEL) += runlevel.o 24lib-$(CONFIG_RUNLEVEL) += runlevel.o
24lib-$(CONFIG_RX) += rx.o 25lib-$(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
16int 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}