]> 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 d8ac45e8e477799b71232596b99ec2beb96faec3..5c17910fe535249452cb908ffa39b43f5a950205 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1,3 +1,22 @@
+/*
+ * mdmon - monitor external metadata arrays
+ *
+ * Copyright (C) 2007-2008 Neil Brown <neilb@suse.de>
+ * Copyright (C) 2007-2008 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 #include "mdadm.h"
 #include "mdmon.h"
@@ -450,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)