]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Manage: improve error message when given a non-block device.
authorNeilBrown <neilb@suse.de>
Wed, 24 Oct 2012 01:51:14 +0000 (12:51 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 24 Oct 2012 01:51:14 +0000 (12:51 +1100)
commit839f27a38057a56b213d3e873925712c1c3f4b34
tree4d1c923e4871e99821ab9e9781b9f82c6173e950
parent4cda8682c6607d8268072243d310919bcc5f21b2
Manage: improve error message when given a non-block device.

As dev_open uses O_DIRECT it will fail on directories and such.
So we never get to report that it isn't a block device.

So do a 'stat' earlier and if it is a block device, report the
error there.

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