diff options
author | 2008-09-03 23:11:59 +0000 | |
---|---|---|
committer | 2008-09-03 23:11:59 +0000 | |
commit | c2ab83a189dc8191b54516b94e3dcafe564da777 (patch) | |
tree | a9b3e439cb7678f49e6914b750199eadd164337a | |
parent | Provide our own calloc() since we provide our own malloc(), otherwise we won't (diff) | |
download | wireguard-openbsd-c2ab83a189dc8191b54516b94e3dcafe564da777.tar.xz wireguard-openbsd-c2ab83a189dc8191b54516b94e3dcafe564da777.zip |
Start with a max size tape buffer rather than one 1/2 the max (i.e.
32K). This allows the automatic recognition of dumps written with
64K buffers. It also prevents alert scsi devices from complaining
about read requests that provide only 1/2 the room needed for an
actual tape record.
Problem noted, fix tested & ok henning@
-rw-r--r-- | sbin/restore/tape.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 033e5332a59..b4b266b3026 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.36 2007/09/25 09:55:33 chl Exp $ */ +/* $OpenBSD: tape.c,v 1.37 2008/09/03 23:11:59 krw Exp $ */ /* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */ /* @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.6 (Berkeley) 9/13/94"; #else -static const char rcsid[] = "$OpenBSD: tape.c,v 1.36 2007/09/25 09:55:33 chl Exp $"; +static const char rcsid[] = "$OpenBSD: tape.c,v 1.37 2008/09/03 23:11:59 krw Exp $"; #endif #endif /* not lint */ @@ -144,7 +144,8 @@ setinput(char *source) if (bflag) newtapebuf(ntrec); else - newtapebuf(NTREC > HIGHDENSITYTREC ? NTREC : HIGHDENSITYTREC); + /* Max out buffer size, let findtapeblksize() set ntrec. */ + newtapebuf(MAXBSIZE / TP_BSIZE); terminal = stdin; #ifdef RRESTORE |