From 9961979e23019a20aeea6b371f5871b075a15dd5 Mon Sep 17 00:00:00 2001 From: Surbhi Palande Date: Tue, 21 Sep 2010 17:46:57 +0300 Subject: [PATCH 03/19] mapfile: fix bug in testing for /var/run/mdadm/ LP: 550131 If /var/run/mdadm/ did not exist as a directory, the map file should have been created as /var/run/mdadm.map. However due to the wrong testing the map file was not getting renamed from mdadm.map.new to mdadm.map and hence not getting created. Found out while testing for map file! Neil Brown: 35e3446bfeaa4f2a04517ac115710061b704d3a5 Signed-off-by: Surbhi Palande --- mapfile.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mapfile.c b/mapfile.c index 45d438b..2054f85 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; -- 1.7.0.4