Changeset 3344


Ignore:
Timestamp:
Feb 13, 2015, 8:39:50 PM (5 years ago)
Author:
Bruno Cornec
Message:
  • parted2fdisk now calls fdisk with the parameters when not using the embedded code. Ready to be the only call in mondo now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/parted2fdisk.pl

    r3343 r3344  
    197197close(CMD);
    198198chomp($version);
    199 $version =~ s/[^0-9\.]*([0-9\.]+)[\)]$/$1/;
     199$version =~ s/[^0-9\.]*([0-9\.]+)[\)]*$/$1/;
    200200my ($v,$maj,$min) = split(/\./,$version);
    201201
     
    370370#
    371371# Print only mode
    372 print FLOG "Passing everything to the real fdisk\n";
    373 my $fargs = join(@ARGV);
     372print FLOG "Passing everything to the real fdisk with $args $device\n";
    374373
    375374if ($args =~ /^-/) {
    376375    # -l or -s
    377     open (FDISK, "$fdisk $fargs 2>/dev/null |") || die "Unable to read from $fdisk";
     376    open (FDISK, "$fdisk $args $device 2>/dev/null |") || die "Unable to read from $fdisk";
    378377    while (<FDISK>) {
    379         print;
     378        print $_;
    380379    }
    381380    close(FDISK);
    382381} else {
    383382    # Modification mode
    384     open (FDISK, "| $fdisk $fargs 2>/dev/null") || die "Unable to modify through $fdisk";
     383    open (FDISK, "| $fdisk $args $device 2>/dev/null") || die "Unable to modify through $fdisk";
    385384    while (<STDIN>) {
    386         print FDISK;
     385        print FDISK $_;
    387386    }
    388387    close(FDISK);
Note: See TracChangeset for help on using the changeset viewer.