diskmanage: fix device encoding handling

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-02-04 10:42:01 +01:00
committed by Thomas Lamprecht
parent 902a6bb379
commit f2e5018e70

View File

@ -566,8 +566,8 @@ sub get_partnum {
my ($mode, $rdev) = (stat($part_path))[2,6];
next if !$mode || !S_ISBLK($mode) || !$rdev;
my $major = int($rdev / 0x100);
my $minor = $rdev % 0x100;
my $major = PVE::Tools::dev_t_major($rdev);
my $minor = PVE::Tools::dev_t_minor($rdev);
my $partnum_path = "/sys/dev/block/$major:$minor/";
my $partnum;