mdadm/raidautorun.c

17 lines
266 B
C

#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/major.h>
#include <linux/raid/md_u.h>
int main(int argc, char *argv[])
{
int fd = open("/dev/md0", O_RDWR);
if (fd >= 0) {
ioctl(fd, RAID_AUTORUN, 0);
close(fd);
}
return (0);
}