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>
This commit is contained in:
NeilBrown 2008-11-03 07:19:37 +11:00
parent 350ac35d1f
commit 35e3446bfe
1 changed files with 1 additions and 1 deletions

View File

@ -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;