all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH pve-storage 1/1] api2: disks: add mounted boolean field
Date: Wed, 15 Jun 2022 10:24:50 +0200	[thread overview]
Message-ID: <20220615082450.7kbodgk73m5pe4ef@wobu-vie.proxmox.com> (raw)
In-Reply-To: <20220608071000.3852-2-h.laimer@proxmox.com>

applied, thanks

On Wed, Jun 08, 2022 at 07:09:59AM +0000, Hannes Laimer wrote:
> ... and remove '(mounted)' from usage string
> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>  PVE/API2/Disks.pm | 1 +
>  PVE/Diskmanage.pm | 7 +++----
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm
> index b618057..bde6132 100644
> --- a/PVE/API2/Disks.pm
> +++ b/PVE/API2/Disks.pm
> @@ -125,6 +125,7 @@ __PACKAGE__->register_method ({
>  		},
>  		used => { type => 'string', optional => 1 },
>  		gpt => { type => 'boolean' },
> +		mounted => { type => 'boolean' },
>  		size => { type => 'integer'},
>  		osdid => { type => 'integer'},
>  		vendor =>  { type => 'string', optional => 1 },
> diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
> index d67cc6b..253916b 100644
> --- a/PVE/Diskmanage.pm
> +++ b/PVE/Diskmanage.pm
> @@ -605,6 +605,7 @@ sub get_disks {
>  	    size => $sysdata->{size},
>  	    serial => $data->{serial},
>  	    gpt => $data->{gpt},
> +	    mounted => exists $mounted->{$devpath},
>  	    rpm => $data->{rpm},
>  	    type =>  $type,
>  	    wwn => $data->{wwn},
> @@ -650,10 +651,7 @@ sub get_disks {
>  	    }
>  
>  	    my $fstype = $info->{fstype};
> -	    if (defined($fstype)) {
> -		return "${fstype} (mounted)" if $mounted->{$devpath};
> -		return "${fstype}";
> -	    }
> +	    return "${fstype}" if defined($fstype);
>  	    return 'mounted' if $mounted->{$devpath};
>  
>  	    return if !$is_partition;
> @@ -693,6 +691,7 @@ sub get_disks {
>  
>  	    $partitions->{$part}->{devpath} = "$partpath/$part";
>  	    $partitions->{$part}->{parent} = "$devpath";
> +	    $partitions->{$part}->{mounted} = exists $mounted->{"$partpath/$part"};
>  	    $partitions->{$part}->{gpt} = $data->{gpt};
>  	    $partitions->{$part}->{type} = 'partition';
>  	    $partitions->{$part}->{size} =
> -- 
> 2.30.2




  reply	other threads:[~2022-06-15  8:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08  7:09 [pve-devel] [PATCH proxmox-widget-toolkit/pve-storage] replace '(mounted)' string by " Hannes Laimer
2022-06-08  7:09 ` [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted " Hannes Laimer
2022-06-15  8:24   ` Wolfgang Bumiller [this message]
2022-06-08  7:10 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column Hannes Laimer
2022-06-15  8:58   ` [pve-devel] applied: " Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220615082450.7kbodgk73m5pe4ef@wobu-vie.proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal