]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdmon: recognise --all in place of /proc/mdstat
authorNeilBrown <neilb@suse.de>
Thu, 4 Feb 2010 06:34:06 +0000 (17:34 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 4 Feb 2010 06:34:06 +0000 (17:34 +1100)
It seems more meaningful.
Keep the old option as well for back compatibility.

Signed-off-by: NeilBrown <neilb@suse.de>
mdmon.8
mdmon.c

diff --git a/mdmon.8 b/mdmon.8
index 1dc7844ee5e593e590e65dc2a353a34072a924c3..9be03271430ea31ad85b1902d68c059a6ef37585 100644 (file)
--- a/mdmon.8
+++ b/mdmon.8
@@ -129,7 +129,9 @@ CONTAINER
 The
 .B container
 device to monitor.  It can be a full path like /dev/md/container, a simple md
 The
 .B container
 device to monitor.  It can be a full path like /dev/md/container, a simple md
-device name like md127, or /proc/mdstat which tells
+device name like md127, or
+.I \-\-all
+ which tells
 .I mdmon
 to scan for containers and launch an
 .I mdmon
 .I mdmon
 to scan for containers and launch an
 .I mdmon
@@ -200,7 +202,7 @@ root filesystem.
 
 .SH EXMAPLES
 
 
 .SH EXMAPLES
 
-.B "  mdmon /proc/mdstat /"
+.B "  mdmon --all /"
 .br
 Any
 .I mdmon
 .br
 Any
 .I mdmon
diff --git a/mdmon.c b/mdmon.c
index fa49706b61b6fc0a7581041a966ef03dda2f3737..37474603ee6cce0a4c14564301cadf4bae0fac24 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -274,7 +274,8 @@ int main(int argc, char *argv[])
                usage();
        }
 
                usage();
        }
 
-       if (strcmp(container_name, "/proc/mdstat") == 0) {
+       if (strcmp(container_name, "/proc/mdstat") == 0 ||
+           strcmp(container_name, "--all") == 0) {
                struct mdstat_ent *mdstat, *e;
 
                /* launch an mdmon instance for each container found */
                struct mdstat_ent *mdstat, *e;
 
                /* launch an mdmon instance for each container found */