diff options
author | NeilBrown <neilb@suse.de> | 2008-11-20 14:51:42 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-20 14:51:42 +1100 |
commit | e8a70c89585ddca2bcb4160808f64506c64df13b (patch) | |
tree | 056c7f8aa0eb9bc1b4b76132d419226c12095030 /monitor.c | |
parent | bf68e9d9ab185121b6004fc81b531bce8348726d (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |