NeilBrown: mdmon: recognise --all in place of /proc/mdstat

Martin F. Krafft madduck at alioth.debian.org
Mon May 24 09:20:57 UTC 2010


Module: mdadm
Branch: upstream
Commit: a9596b79a316404bbb4e3792c97b3d0a597ec885
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=a9596b79a316404bbb4e3792c97b3d0a597ec885

Author: NeilBrown <neilb at suse.de>
Date:   Thu Feb  4 17:34:06 2010 +1100

mdmon: recognise --all in place of /proc/mdstat

It seems more meaningful.
Keep the old option as well for back compatibility.

Signed-off-by: NeilBrown <neilb at suse.de>

---

 mdmon.8 |    6 ++++--
 mdmon.c |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/mdmon.8 b/mdmon.8
index 1dc7844..9be0327 100644
--- 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
-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
@@ -200,7 +202,7 @@ root filesystem.
 
 .SH EXMAPLES
 
-.B "  mdmon /proc/mdstat /"
+.B "  mdmon --all /"
 .br
 Any
 .I mdmon
diff --git a/mdmon.c b/mdmon.c
index fa49706..3747460 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -274,7 +274,8 @@ int main(int argc, char *argv[])
 		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 */




More information about the pkg-mdadm-commits mailing list