Changeset 3344 in MondoRescue for branches/3.2/mindi/parted2fdisk.pl
- Timestamp:
- Feb 13, 2015, 8:39:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/parted2fdisk.pl
r3343 r3344 197 197 close(CMD); 198 198 chomp($version); 199 $version =~ s/[^0-9\.]*([0-9\.]+)[\)] $/$1/;199 $version =~ s/[^0-9\.]*([0-9\.]+)[\)]*$/$1/; 200 200 my ($v,$maj,$min) = split(/\./,$version); 201 201 … … 370 370 # 371 371 # Print only mode 372 print FLOG "Passing everything to the real fdisk\n"; 373 my $fargs = join(@ARGV); 372 print FLOG "Passing everything to the real fdisk with $args $device\n"; 374 373 375 374 if ($args =~ /^-/) { 376 375 # -l or -s 377 open (FDISK, "$fdisk $ fargs2>/dev/null |") || die "Unable to read from $fdisk";376 open (FDISK, "$fdisk $args $device 2>/dev/null |") || die "Unable to read from $fdisk"; 378 377 while (<FDISK>) { 379 print ;378 print $_; 380 379 } 381 380 close(FDISK); 382 381 } else { 383 382 # Modification mode 384 open (FDISK, "| $fdisk $ fargs2>/dev/null") || die "Unable to modify through $fdisk";383 open (FDISK, "| $fdisk $args $device 2>/dev/null") || die "Unable to modify through $fdisk"; 385 384 while (<STDIN>) { 386 print FDISK ;385 print FDISK $_; 387 386 } 388 387 close(FDISK);
Note:
See TracChangeset
for help on using the changeset viewer.