From 3cebac2006571a93ea0cbf992faa5eec3454d570 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 22 Feb 2005 20:54:06 +0000 Subject: [PATCH] Only consider a disk to exist if it has nonzero size. --- src/utils/pintos | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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/) { -- 2.30.2