]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Monitor.c
Monitor: don't assume mdadm parameter is a block device
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Mon, 19 Jun 2017 09:19:53 +0000 (11:19 +0200)
committerJes Sorensen <jsorensen@fb.com>
Mon, 10 Jul 2017 17:40:05 +0000 (13:40 -0400)
commitcb91230c87e02bf885759e9218abea629ab9f4b9
treea66f4a98c45f1bf36399c26cd361ab739815fdbf
parent25357919d227fd907e4da167d0e07f33f9c94bca
Monitor: don't assume mdadm parameter is a block device

If symlink (e.g. /dev/md/raid) is passed as a parameter to mdadm --wait,
it fails as it's not able to find a corresponding entry in /proc/mdstat
output. Get parameter file major:minor and look for block device name in
sysfs. This commit is partial revert of commit 9e04ac1c43e6
("mdadm/util: unify stat checking blkdev into function").

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Monitor.c