mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests/gdisk/test-expand-gpt.pl: Fix some warnings
"my" variable $output masks earlier declaration in same scope at ./gdisk/test-expand-gpt.pl line 73. "my" variable $end_sectors masks earlier declaration in same scope at ./gdisk/test-expand-gpt.pl line 78.
This commit is contained in:
@@ -70,12 +70,12 @@ sub tests {
|
||||
|
||||
die if $g->part_expand_gpt ("/dev/sda");
|
||||
|
||||
my $output = $g->debug ("sh", ["sgdisk", "-p", "/dev/sda"]);
|
||||
$output = $g->debug ("sh", ["sgdisk", "-p", "/dev/sda"]);
|
||||
die if $output eq "";
|
||||
$output =~ s/\n/ /g;
|
||||
$output =~ s/.*last usable sector is (\d+).*/$1/g;
|
||||
|
||||
my $end_sectors = 50 * 1024 * 2 - $output;
|
||||
$end_sectors = 50 * 1024 * 2 - $output;
|
||||
die unless $end_sectors <= 34;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user