pkgsrc-wip/copytape/patches/patch-aa
Marc Recht da406e5d68 initial import of copytape 1.0
provided in PR 23440 by Eric Schnoebelen

Copytape duplicates magtapes. It is intended for duplication of
bootable or other non-file-structured (non-tar-structured) magtapes
on systems with only one tape drive. Copytape is blissfully ignorant
of tape formats. It merely makes a bit-for-bit copy of its input.
2003-11-27 19:29:38 +00:00

30 lines
817 B
Text

$NetBSD: patch-aa,v 1.1.1.1 2003/11/27 19:29:40 anoncvs_oppn Exp $
--- copytape.c.orig Wed Nov 12 12:55:19 2003
+++ copytape.c
@@ -29,6 +29,7 @@
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
@@ -36,7 +37,7 @@
extern int errno;
-#define BUFLEN 262144 /* max tape block size */
+#define BUFLEN (1024*1024) /* max tape block size */
#define TAPE_MARK -100 /* return record length if we read a
* tape mark */
#define END_OF_TAPE -101 /* 2 consecutive tape marks */
@@ -149,7 +150,7 @@ main(argc, argv)
len = input(from);
} while (len > 0);
if (len == FORMAT_ERROR) {
- perror(stderr, "copytape: format error on skip");
+ perror("copytape: format error on skip");
exit(-1);
};
if (len == END_OF_TAPE) {