[pve-devel] [PATCH container 1/3] Fix #791: warn when resize2fs fails

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Feb 5 09:58:39 CET 2016


> On February 5, 2016 at 9:53 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
> 
> 
> >  		    } else {
> > -			PVE::Tools::run_command(['e2fsck', '-f', '-y', $path]);
> > -			PVE::Tools::run_command(['resize2fs', $path]);
> > +			eval {
> > +			    PVE::Tools::run_command(['e2fsck', '-f', '-y', $path]);
> > +			    PVE::Tools::run_command(['resize2fs', $path]);
> > +			};
> >  		    }
> > +		    warn "Failed to update the container's filesystem: $@\n";
> 
> looks strange to me - what if there is no error ($@ can be undefined)?

Hah... how did that happen, there should be an 'if $@' before the ';'




More information about the pve-devel mailing list