From d6cb0b7c1d0e8c5ee44ea13532021dc0709df954 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 22 Feb 2003 12:41:11 +0000 Subject: (test_for_bad_drives): don't open in write mode when testing --- perl-install/partition_table/raw.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/partition_table') diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index c25127cdc..9d7fb5688 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -176,7 +176,7 @@ sub test_for_bad_drives { sub error { die "$_[0] error: $_[1]" } - my $F = openit($hd, 2) or error(openit($hd) ? 'write' : 'read', "can't open device"); + my $F = openit($hd, $::testing ? 0 : 2) or error(openit($hd) ? 'write' : 'read', "can't open device"); my $seek = sub { c::lseek_sector(fileno($F), $sector, 0) or error('read', "seeking to sector $sector failed"); -- cgit v1.2.1