]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Fix "--remove faulty" and similar commands.
authorNeilBrown <neilb@suse.de>
Tue, 27 Nov 2012 23:12:09 +0000 (10:12 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 27 Nov 2012 23:12:09 +0000 (10:12 +1100)
commit5fe7f5f7c8c4c02e108d48aec5463329870ff71b
tree4ec5c49fb9527e4e7f15e22d697a6a9eed0c4dd8
parent66eb2c93a619eb1d79dc653fd91add159aa3d1ff
Fix "--remove faulty" and similar commands.

A recent change to improve error messages for subdev management broken
all use cases were device names like %d:%d were used.
Re-arrange the code again so we use dev_open first - which understands
those names - and then only try 'stat' if that failed.
The important thing is to base the 'Cannot find' message on the result
of 'stat', not on the result of 'open'.

Signed-off-by: NeilBrown <neilb@suse.de>
Manage.c