mdmon: pass symbolic name to mdmon instead of device name.
[thirdparty/mdadm.git] / monitor.c
index 15791f4..5c17910 100644 (file)
--- 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)