ps: conditionally enable -T on non-DESKTOP build too
[oweals/busybox.git] / miscutils / raidautorun.c
index c2563049444fde6b8e4114d6f1125f22485c9c6d..a2a852bbf2458b0e6b7cc384120f1c75e2f13a2a 100644 (file)
@@ -2,22 +2,24 @@
 /*
  * raidautorun implementation for busybox
  *
- * Copyright (C) 2006 Bernhard Fischer
+ * Copyright (C) 2006 Bernhard Reutner-Fischer
  *
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  *
  */
 
-#include "busybox.h"
+#include "libbb.h"
 
 #include <linux/major.h>
 #include <linux/raid/md_u.h>
 
+int raidautorun_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int raidautorun_main(int argc, char **argv)
 {
-       if (ioctl(xopen(argv[1], O_RDONLY), RAID_AUTORUN, NULL) != 0) {
-               bb_perror_msg_and_die("ioctl");
-       }
+       if (argc != 2)
+               bb_show_usage();
+
+       xioctl(xopen(argv[1], O_RDONLY), RAID_AUTORUN, NULL);
 
        return EXIT_SUCCESS;
 }