NeilBrown: mapfile: fix bug in testing for /var/run/mdadm/

Martin F. Krafft madduck at alioth.debian.org
Tue Nov 11 11:27:55 UTC 2008


Module: mdadm
Branch: upstream
Commit: 35e3446bfeaa4f2a04517ac115710061b704d3a5
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=35e3446bfeaa4f2a04517ac115710061b704d3a5

Author: NeilBrown <neilb at suse.de>
Date:   Mon Nov  3 07:19:37 2008 +1100

mapfile:  fix bug in testing for /var/run/mdadm/

There was a bug.  If /var/run/mdadm/ did not exist as a directory,
the map file should have been created in /var/run/mdadm.map, but
due to bug it would never get created.

Signed-off-by: NeilBrown <neilb at suse.de>

---

 mapfile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mapfile.c b/mapfile.c
index 746073d..f616f15 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -53,7 +53,7 @@ int map_write(struct map_ent *mel)
 	f = fopen("/var/run/mdadm/map.new", "w");
 	if (!f) {
 		f = fopen("/var/run/mdadm.map.new", "w");
-		subdir = 1;
+		subdir = 0;
 	}
 	if (!f)
 		return 0;




More information about the pkg-mdadm-commits mailing list