From: NeilBrown Date: Sun, 2 Nov 2008 20:19:37 +0000 (+1100) Subject: mapfile: fix bug in testing for /var/run/mdadm/ X-Git-Tag: mdadm-2.6.8~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35e3446bfeaa4f2a04517ac115710061b704d3a5;p=thirdparty%2Fmdadm.git 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 --- diff --git a/mapfile.c b/mapfile.c index 746073d0..f616f159 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;