[pve-devel] [PATCH container v3 4/8] run make tidy
Fiona Ebner
f.ebner at proxmox.com
Fri Jan 23 15:34:24 CET 2026
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
New in v3.
Done separately for readability of the previous commit, can be
squashed into that.
src/PVE/API2/LXC.pm | 29 ++++++++++-------------------
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index ede8f62..8623d63 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -164,12 +164,10 @@ my sub create_ct_determine_mp_param {
if (!defined($orig_mp_param)) {
print "recovering backed-up configuration from '$archive'\n";
- (undef, $orig_mp_param) =
- PVE::LXC::Create::recover_config($storage_cfg, $archive, $vmid);
+ (undef, $orig_mp_param) = PVE::LXC::Create::recover_config($storage_cfg, $archive, $vmid);
}
$mp_param = $orig_mp_param;
- die
- "rootfs configuration could not be recovered, please check and specify manually!\n"
+ die "rootfs configuration could not be recovered, please check and specify manually!\n"
if !defined($mp_param->{rootfs});
PVE::LXC::Config->foreach_volume(
$mp_param,
@@ -177,40 +175,33 @@ my sub create_ct_determine_mp_param {
my ($ms, $mountpoint) = @_;
my $type = $mountpoint->{type};
if ($type eq 'volume') {
- die
- "unable to detect disk size - please specify $ms (size)\n"
+ die "unable to detect disk size - please specify $ms (size)\n"
if !defined($mountpoint->{size});
my $disksize = $mountpoint->{size} / (1024 * 1024 * 1024); # create_disks expects GB as unit size
delete $mountpoint->{size};
$mountpoint->{volume} = "$storage:$disksize";
$mp_param->{$ms} = PVE::LXC::Config->print_ct_mountpoint(
- $mountpoint,
- $ms eq 'rootfs',
+ $mountpoint, $ms eq 'rootfs',
);
} else {
my $type = $mountpoint->{type};
die
"restoring rootfs to $type mount is only possible by specifying -rootfs manually!\n"
if ($ms eq 'rootfs');
- die
- "restoring '$ms' to $type mount is only possible for root\n"
+ die "restoring '$ms' to $type mount is only possible for root\n"
if !$is_root;
if ($mountpoint->{backup}) {
warn "WARNING - unsupported configuration!\n";
- warn
- "backup was enabled for $type mount point $ms ('$mountpoint->{mp}')\n";
+ warn "backup was enabled for $type mount point $ms ('$mountpoint->{mp}')\n";
warn
"mount point configuration will be restored after archive extraction!\n";
- warn
- "contained files will be restored to wrong directory!\n";
+ warn "contained files will be restored to wrong directory!\n";
}
delete $mp_param->{$ms}; # actually delay bind/dev mps
- $delayed_mp_param->{$ms} =
- PVE::LXC::Config->print_ct_mountpoint(
- $mountpoint,
- $ms eq 'rootfs',
- );
+ $delayed_mp_param->{$ms} = PVE::LXC::Config->print_ct_mountpoint(
+ $mountpoint, $ms eq 'rootfs',
+ );
}
},
);
--
2.47.3
More information about the pve-devel
mailing list