From: Ben Pfaff Date: Tue, 22 Feb 2005 20:54:06 +0000 (+0000) Subject: Only consider a disk to exist if it has nonzero size. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cebac2006571a93ea0cbf992faa5eec3454d570;p=pintos-anon Only consider a disk to exist if it has nonzero size. --- diff --git a/src/utils/pintos b/src/utils/pintos index ea4bdcc..40a240c 100755 --- a/src/utils/pintos +++ b/src/utils/pintos @@ -214,8 +214,9 @@ sub run_vm { our (@disks); die "$disks[0]: can't find OS disk\n" if ! -e $disks[0]; + die "$disks[0]: OS disk cannot have zero size\n" if ! -s $disks[0]; for my $i (1...3) { - undef $disks[$i] if ! -e $disks[$i]; + undef $disks[$i] if ! -s $disks[$i]; } if (my ($project) = `pwd` =~ /\b(threads|userprog|vm|filesys)\b/) {