diff options
author | NeilBrown <neilb@suse.de> | 2009-05-11 07:47:10 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-05-11 07:47:10 +0200 |
commit | 8615dcff2865a01e17bb63cdbcc6064c3c1b424a (patch) | |
tree | a425880fb750f2f435907e8d1dd4ee7525b0617c /mdadm.c | |
parent | map_dev: prefer names in /dev/md/ (diff) | |
download | mdadm-8615dcff2865a01e17bb63cdbcc6064c3c1b424a.tar.xz mdadm-8615dcff2865a01e17bb63cdbcc6064c3c1b424a.zip |
mapfile: allow the path name to the device to be empty.
Allowing an empty name and coping with it is less confusing
than seeing "/empty" appear.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1257,7 +1257,8 @@ int main(int argc, char *argv[]) char *name; struct map_ent *me; me = map_by_devnum(&map, e->devnum); - if (me && me->path) + if (me && me->path + && strcmp(me->path, "/unknown") != 0) name = me->path; else name = get_md_name(e->devnum); |