summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-20 14:51:42 +1100
committerNeilBrown <neilb@suse.de>2008-11-20 14:51:42 +1100
commite8a70c89585ddca2bcb4160808f64506c64df13b (patch)
tree056c7f8aa0eb9bc1b4b76132d419226c12095030 /monitor.c
parentbf68e9d9ab185121b6004fc81b531bce8348726d (diff)
downloadmdadm-e8a70c89585ddca2bcb4160808f64506c64df13b.tar.gz
mdadm-e8a70c89585ddca2bcb4160808f64506c64df13b.tar.xz
mdadm-e8a70c89585ddca2bcb4160808f64506c64df13b.zip
mdmon: pass symbolic name to mdmon instead of device name.
Now that names in /dev are usually created (eventually) by udev, it isn't really safe to rely in finding a name in /dev to pass to mdmon to identify which array to monitor. And it isn't really necessary to have a name in /dev. So just pass the symbolic name, e.g. md127 or md123. Change util.c to pass that name, and change mdmon to process the name sensibly. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 15791f4..5c17910 100644
--- a/monitor.c
+++ b/monitor.c
@@ -469,7 +469,7 @@ static int wait_and_act(struct supertype *container, int nowait)
* problem as there are no active arrays, there is
* nothing that we need to be ready to do.
*/
- int fd = open(container->device_name, O_RDONLY|O_EXCL);
+ int fd = open_dev_excl(container->devnum);
if (fd >= 0 || errno != EBUSY) {
/* OK, we are safe to leave */
if (sigterm && !dirty_arrays)