multipath: better argument type checking
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 11 Oct 2011 03:18:09 +0000 (22:18 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 11 Oct 2011 04:52:38 +0000 (06:52 +0200)
commite0cb40998ea1330e1419da98414270d2e485177a
tree2d51b8aa59a44e1a87f3130b2a1d0da6cfea01b7
parent58abb990a791663f281569debe1469bb9b005cd9
multipath: better argument type checking

The way that multipath decided what you passed in as an argument didn't
always work.  If the argument was the name of a file, then multipath
assumed that it was a path.  That meant if you were in /dev/mapper and ran

# multipath -f <mpath_device_name>

It would fail, since it thought you gave it a path name, instead of a
multipath device name.  Now multipath will only treat the argument
as a path name if it is a block device with a different major number than
device-mapper's.  Also, I've switched the MAJOR/MINOR/MKDEV macros to
work like kpartx, so that they can handle minor numbers over 255.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipath/dev_t.h
multipath/main.c