Fix format module

This commit is contained in:
Jamie Cameron
2009-03-05 21:53:30 +00:00
parent 4b6ce0eebd
commit fa086989fd
2 changed files with 5 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ close(TEMP);
open(FORMAT, "format -f $temp |");
while(1) {
local $rv = &wait_for(FORMAT, 'Specify', '\s+\d+\. (\S+) <(.*) cyl (\d+) alt (\d+) hd (\d+) sec (\d+)>\s*(\S*)', '\s+\d+\. (\S+) <drive type unknown>', 'space for more');
if ($rv == 0) { last; }
if ($rv <= 0) { last; }
elsif ($rv == 1) {
local $disk = { 'device' => "/dev/dsk/$matches[1]",
'type' => $matches[2] eq 'DEFAULT' ?

View File

@@ -1431,7 +1431,10 @@ undef($wait_for_input);
if ($wait_for_debug) {
print STDERR "wait_for(",join(",", @_),")\n";
}
$ha = $_[0];
$ha = &callers_package($_[0]);
if ($wait_for_debug) {
print STDERR "File handle=$ha fd=",fileno($ha),"\n";
}
$codes =
"my \$hit;\n".
"while(1) {\n".