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.
10 //config:config RAIDAUTORUN
11 //config: bool "raidautorun (1.4 kb)"
13 //config: select PLATFORM_LINUX
15 //config: raidautorun tells the kernel md driver to
16 //config: search and start RAID arrays.
18 //applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP))
20 //kbuild:lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
22 //usage:#define raidautorun_trivial_usage
24 //usage:#define raidautorun_full_usage "\n\n"
25 //usage: "Tell the kernel to automatically search and start RAID arrays"
27 //usage:#define raidautorun_example_usage
28 //usage: "$ raidautorun /dev/md0"
32 #include <linux/major.h>
33 #include <linux/raid/md_u.h>
35 int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
36 int raidautorun_main(int argc UNUSED_PARAM, char **argv)
38 xioctl(xopen(single_argv(argv), O_RDONLY), RAID_AUTORUN, NULL);