raidautorun.c 778 B

1234567891011121314151617181920212223242526272829
  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. //usage:#define raidautorun_trivial_usage
  11. //usage: "DEVICE"
  12. //usage:#define raidautorun_full_usage "\n\n"
  13. //usage: "Tell the kernel to automatically search and start RAID arrays"
  14. //usage:
  15. //usage:#define raidautorun_example_usage
  16. //usage: "$ raidautorun /dev/md0"
  17. #include "libbb.h"
  18. #include <linux/major.h>
  19. #include <linux/raid/md_u.h>
  20. int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
  21. int raidautorun_main(int argc UNUSED_PARAM, char **argv)
  22. {
  23. xioctl(xopen(single_argv(argv), O_RDONLY), RAID_AUTORUN, NULL);
  24. return EXIT_SUCCESS;
  25. }