diff --git a/format/format-lib.pl b/format/format-lib.pl index c1df062df..77472bf71 100644 --- a/format/format-lib.pl +++ b/format/format-lib.pl @@ -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+) ', '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' ? diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index dca5c8cf1..4d8ecd997 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -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".