blob: b72d89058e45918c9bacc09ac100c88a9ef2a08f
1 | /* vi: set sw=4 ts=4: */ |
2 | /* |
3 | * raidautorun implementation for busybox |
4 | * |
5 | * Copyright (C) 2006 Bernhard Reutner-Fischer |
6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | * |
9 | */ |
10 | |
11 | //usage:#define raidautorun_trivial_usage |
12 | //usage: "DEVICE" |
13 | //usage:#define raidautorun_full_usage "\n\n" |
14 | //usage: "Tell the kernel to automatically search and start RAID arrays" |
15 | //usage: |
16 | //usage:#define raidautorun_example_usage |
17 | //usage: "$ raidautorun /dev/md0" |
18 | |
19 | #include "libbb.h" |
20 | |
21 | #include <linux/major.h> |
22 | #include <linux/raid/md_u.h> |
23 | |
24 | int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
25 | int raidautorun_main(int argc UNUSED_PARAM, char **argv) |
26 | { |
27 | xioctl(xopen(single_argv(argv), O_RDONLY), RAID_AUTORUN, NULL); |
28 | return EXIT_SUCCESS; |
29 | } |
30 |