[pve-devel] applied: [PATCH storage] diskmanage: fix device encoding handling

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Feb 4 12:10:02 CET 2019


Am 2/4/19 um 10:42 AM schrieb Wolfgang Bumiller:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>  PVE/Diskmanage.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
> index 854f0a5..66b264a 100644
> --- a/PVE/Diskmanage.pm
> +++ b/PVE/Diskmanage.pm
> @@ -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;
> 

applied, thanks!




More information about the pve-devel mailing list