]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - monitor.c
mdmon: pass symbolic name to mdmon instead of device name.
[thirdparty/mdadm.git] / monitor.c
index 15791f4e93ae79f073621b42ae8147fcb2149e31..5c17910fe535249452cb908ffa39b43f5a950205 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.
                 */
                 * 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)
                if (fd >= 0 || errno != EBUSY) {
                        /* OK, we are safe to leave */
                        if (sigterm && !dirty_arrays)