summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Manage.c b/Manage.c
index 3deb8ea..d857c99 100644
--- a/Manage.c
+++ b/Manage.c
@@ -507,4 +507,17 @@ int Manage_subdevs(char *devname, int fd,
return 0;
}
+
+int autodetect(void)
+{
+ /* Open any md device, and issue the RAID_AUTORUN ioctl */
+ int rv = 1;
+ int fd = dev_open("9:0", O_RDONLY);
+ if (fd >= 0) {
+ if (ioctl(fd, RAID_AUTORUN, 0) == 0)
+ rv = 0;
+ close(fd);
+ }
+ return rv;
+}
#endif