X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=grading%2Fuserprog%2Fprep-disk;h=f525b07adc38fbfb6bf21d81d469066a809887f3;hb=b4f489ab73a6b097fcc391bc6f18640662b5398e;hp=f1b766c8614ebebf16d53dc32299d7f8d27bf091;hpb=3403a18c29c58560ea393faf81d8d341c0cda503;p=pintos-anon diff --git a/grading/userprog/prep-disk b/grading/userprog/prep-disk index f1b766c..f525b07 100755 --- a/grading/userprog/prep-disk +++ b/grading/userprog/prep-disk @@ -34,7 +34,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"); put_file ("$test"); put_file ("sample.txt") if grep ($_ eq $test, @@ -56,12 +56,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"; - WIFEXITED ($code) && WEXITSTATUS ($code) == $expect - or die "command failed\n"; + system ($cmd) == 0 or die "command failed\n"; }