1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

fix device name from devno for partitions

sysfs files for partitions are different from
whole devices and will require more work to translate
to device names.
This commit is contained in:
David Teigland 2021-11-05 16:21:23 -05:00
parent 62533ae3fa
commit b4067e84c7

View File

@ -2125,7 +2125,7 @@ static char *_get_devname_from_devno(struct cmd_context *cmd, dev_t devno)
}
if (!(dir = opendir(path)))
return NULL;
goto try_partition;
while ((dirent = readdir(dir))) {
if (dirent->d_name[0] == '.')
@ -2175,6 +2175,7 @@ static char *_get_devname_from_devno(struct cmd_context *cmd, dev_t devno)
* major minor #blocks name
*/
try_partition:
if (!(fp = fopen("/proc/partitions", "r")))
return NULL;