summaryrefslogtreecommitdiffstats
path: root/mapfile.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-11-02 21:19:37 +0100
committerNeilBrown <neilb@suse.de>2008-11-02 21:19:37 +0100
commit35e3446bfeaa4f2a04517ac115710061b704d3a5 (patch)
tree4c60569e4c0f9f4a663425baa8d31d3db6787b92 /mapfile.c
parentIncremental: change precedence order for autof setting. (diff)
downloadmdadm-35e3446bfeaa4f2a04517ac115710061b704d3a5.tar.xz
mdadm-35e3446bfeaa4f2a04517ac115710061b704d3a5.zip
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@suse.de>
Diffstat (limited to 'mapfile.c')
-rw-r--r--mapfile.c2
1 files changed, 1 insertions, 1 deletions
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;