[pve-devel] applied: [PATCH container] fix #2080: fix device encoding in the prestart hook

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


Am 2/4/19 um 10:42 AM schrieb Wolfgang Bumiller:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>  src/lxc-pve-prestart-hook | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook
> index 7933071..6e9c589 100755
> --- a/src/lxc-pve-prestart-hook
> +++ b/src/lxc-pve-prestart-hook
> @@ -109,8 +109,8 @@ __PACKAGE__->register_method ({
>  	    foreach my $dev (@$devices) {
>  		my ($mode, $rdev) = (stat($dev))[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);
>  		$devlist .= "b:$major:$minor:$dev\n";
>  	    }
>  	    PVE::Tools::file_set_contents($devlist_file, $devlist);
> 

applied, thanks!




More information about the pve-devel mailing list