blob: f902c9ddcd68e8d242f845d555446311a3da0228 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-ap,v 1.1 2007/02/07 02:04:15 gdt Exp $
--- changer-src/chg-chio.pl.in.orig 2003-11-21 14:09:35.000000000 -0500
+++ changer-src/chg-chio.pl.in
@@ -281,6 +281,13 @@ sub Load {
print "$progname: cannot '@CHIO@ -f $changerDevice move' tape $tape into drive 0\n";
exit(2);
}
+
+ # wait for tape to load
+ do {
+ print LOG &do_time(), ": waiting for tape to load\n";
+ sleep 30;
+ } while ( system("$MT $MTF $tapeDevice status > /dev/null 2>&1" ) );
+
print LOG &do_time(), ": leave: Load\n";
}
@@ -302,8 +309,8 @@ sub Unload {
# firmware rev but for now it's safest to just explicitly eject
# the tape before moving the cartridge.
#
- if ( system ("@MT@ @MT_FILE_FLAG@ $tapeDevice offline") ) {
- print "$progname: Warning, failed to eject the tape with '@MT@ @MT_FILE_FLAG@ $tapeDevice offline'\n";
+ if ( system ("$MT $MTF $tapeDevice offline") ) {
+ print "$progname: Warning, failed to eject the tape with '$MT $MTF $tapeDevice offline'\n";
# NB: not fatal; let chio try it's thing
}
@@ -370,7 +377,7 @@ if (-x "$sbindir/ammt$SUF") {
print "<none> mt program not found\n";
exit(1);
}
-print LOG &do_time(), "MT -> $MT $MTF\n";
+print LOG &do_time(), ": MT -> $MT $MTF\n";
system ("$MT $MTF $tapeDevice rewind")
unless $currentTape == 0;
|