[pve-devel] [PATCH 3/9] add find_loopdev sub

Dietmar Maurer dietmar at proxmox.com
Mon Aug 17 10:45:12 CEST 2015


applied patch 1-3

On 08/16/2015 07:43 PM, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>   src/PVE/LXC.pm | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index fbdc5bb..10a89f2 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1800,4 +1800,11 @@ sub blockdevices_list {
>       return $bdevs;
>   }
>   
> +sub find_loopdev {
> +    my ($loopdevs, $path) = @_;
> +
> +    foreach my $dev (keys %$loopdevs){
> +	return $dev if $loopdevs->{$dev} eq $path;
> +    }
> +}
>   1;





More information about the pve-devel mailing list