X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=grading%2Fvm%2Fprep-disk;h=50a6b799cc7ed6a834283cedfbc29aada498c169;hb=9869570326bb4e6d39fb41912a9076d53a82ad2d;hp=d6d85a24035886ff45477882873c49754a5a6920;hpb=3403a18c29c58560ea393faf81d8d341c0cda503;p=pintos-anon diff --git a/grading/vm/prep-disk b/grading/vm/prep-disk index d6d85a2..50a6b79 100755 --- a/grading/vm/prep-disk +++ b/grading/vm/prep-disk @@ -28,7 +28,7 @@ if (! -e $os_disk) { our ($formatted) = 0; unlink $fs_disk; -xsystem (0, "$pintos make-disk '$fs_disk' 2"); +xsystem ("$pintos make-disk '$fs_disk' 2"); while (@ARGV) { put_file (shift (@ARGV)); } @@ -38,13 +38,11 @@ sub put_file { my ($cmd) = "$pintos -v --os-disk='$os_disk' --fs-disk='$fs_disk' put"; $cmd .= " -f", $formatted = 1 if !$formatted; $cmd .= " '$fn'"; - xsystem (1, $cmd); + xsystem ($cmd); } sub xsystem { - my ($expect, $cmd) = @_; + my ($cmd) = @_; print "$cmd\n"; - my ($code) = system ($cmd); - WIFEXITED ($code) && WEXITSTATUS ($code) == $expect - or die "command failed\n"; + system ($cmd) == 0 or die "command failed\n"; }