1 /* vi: set sw=4 ts=4: */
3 * raidautorun implementation for busybox
5 * Copyright (C) 2006 Bernhard Reutner-Fischer
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 //config:config RAIDAUTORUN
10 //config: bool "raidautorun (1.4 kb)"
12 //config: select PLATFORM_LINUX
14 //config: raidautorun tells the kernel md driver to
15 //config: search and start RAID arrays.
17 //applet:IF_RAIDAUTORUN(APPLET_NOEXEC(raidautorun, raidautorun, BB_DIR_SBIN, BB_SUID_DROP, raidautorun))
19 //kbuild:lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
21 //usage:#define raidautorun_trivial_usage
23 //usage:#define raidautorun_full_usage "\n\n"
24 //usage: "Tell the kernel to automatically search and start RAID arrays"
26 //usage:#define raidautorun_example_usage
27 //usage: "$ raidautorun /dev/md0"
31 #include <linux/major.h>
32 #include <linux/raid/md_u.h>
34 int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
35 int raidautorun_main(int argc UNUSED_PARAM, char **argv)
37 xioctl(xopen(single_argv(argv), O_RDONLY), RAID_AUTORUN, NULL);