svn commit: trunk/busybox: include miscutils
vda at busybox.net
vda at busybox.net
Fri Oct 20 19:39:49 UTC 2006
Author: vda
Date: 2006-10-20 12:39:48 -0700 (Fri, 20 Oct 2006)
New Revision: 16415
Log:
raidautorun: new applet, by:
Thomas Jarosch (email?) and
Bernhard Fischer <rep.nop at aon.at>
Added:
trunk/busybox/miscutils/raidautorun.c
Modified:
trunk/busybox/include/applets.h
trunk/busybox/include/usage.h
trunk/busybox/miscutils/Config.in
trunk/busybox/miscutils/Kbuild
Changeset:
Modified: trunk/busybox/include/applets.h
===================================================================
--- trunk/busybox/include/applets.h 2006-10-20 18:36:55 UTC (rev 16414)
+++ trunk/busybox/include/applets.h 2006-10-20 19:39:48 UTC (rev 16415)
@@ -228,6 +228,7 @@
USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_PWD(APPLET(pwd, _BB_DIR_BIN, _BB_SUID_NEVER))
+USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
Modified: trunk/busybox/include/usage.h
===================================================================
--- trunk/busybox/include/usage.h 2006-10-20 18:36:55 UTC (rev 16414)
+++ trunk/busybox/include/usage.h 2006-10-20 19:39:48 UTC (rev 16415)
@@ -2400,6 +2400,13 @@
"$ pwd\n" \
"/root\n"
+#define raidautorun_trivial_usage \
+ "DEVICE"
+#define raidautorun_full_usage \
+ "Tells the kernel to automatically search and start RAID arrays"
+#define raidautorun_example_usage \
+ "$ raidautorun /dev/md0"
+
#define rdate_trivial_usage \
"[-sp] HOST"
#define rdate_full_usage \
Modified: trunk/busybox/miscutils/Config.in
===================================================================
--- trunk/busybox/miscutils/Config.in 2006-10-20 18:36:55 UTC (rev 16414)
+++ trunk/busybox/miscutils/Config.in 2006-10-20 19:39:48 UTC (rev 16415)
@@ -284,6 +284,13 @@
help
nmeter prints various system parameters continuously.
+config RAIDAUTORUN
+ bool "raidautorun"
+ default n
+ help
+ raidautorun tells the kernel md driver to
+ search and start RAID arrays.
+
config READAHEAD
bool "readahead"
default n
Modified: trunk/busybox/miscutils/Kbuild
===================================================================
--- trunk/busybox/miscutils/Kbuild 2006-10-20 18:36:55 UTC (rev 16414)
+++ trunk/busybox/miscutils/Kbuild 2006-10-20 19:39:48 UTC (rev 16415)
@@ -19,6 +19,7 @@
lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
lib-$(CONFIG_MT) += mt.o
lib-$(CONFIG_NMETER) += nmeter.o
+lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
lib-$(CONFIG_READAHEAD) += readahead.o
lib-$(CONFIG_RUNLEVEL) += runlevel.o
lib-$(CONFIG_RX) += rx.o
Added: trunk/busybox/miscutils/raidautorun.c
===================================================================
--- trunk/busybox/miscutils/raidautorun.c 2006-10-20 18:36:55 UTC (rev 16414)
+++ trunk/busybox/miscutils/raidautorun.c 2006-10-20 19:39:48 UTC (rev 16415)
@@ -0,0 +1,23 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * raidautorun implementation for busybox
+ *
+ * Copyright (C) 2006 Bernhard Fischer
+ *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
+ *
+ */
+
+#include "busybox.h"
+
+#include <linux/major.h>
+#include <linux/raid/md_u.h>
+
+int raidautorun_main(int argc, char **argv)
+{
+ if (ioctl(xopen(argv[1], O_RDONLY), RAID_AUTORUN, NULL) != 0) {
+ bb_perror_msg_and_die("ioctl");
+ }
+
+ return EXIT_SUCCESS;
+}
More information about the busybox-cvs
mailing list