aboutsummaryrefslogtreecommitdiffstats
path: root/tapeio.h
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-03-09 21:10:26 -0500
committerBrian Cully <bjc@kublai.com>2022-03-09 21:37:48 -0500
commit720864f2a76d4ee3ed75cb99298b8e94c01f1b29 (patch)
tree7a163efe3d699725a9e9dd2c17aebaa6a6feadc7 /tapeio.h
downloadticra-main.tar.gz
ticra-main.zip
Here’s some old code of mine for a backup system from c. 2000.HEADmain
I used to really hate AMANDA.
Diffstat (limited to 'tapeio.h')
-rw-r--r--tapeio.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/tapeio.h b/tapeio.h
new file mode 100644
index 0000000..bbea95b
--- /dev/null
+++ b/tapeio.h
@@ -0,0 +1,34 @@
+/* $Id: tapeio.h,v 1.1.1.1 1999/02/02 23:29:39 shmit Exp $ */
+
+#ifndef TAPEIO_H
+# define TAPEIO_H
+
+#define HEADERSIZE 8192
+
+typedef enum { STARTMARK, STOPMARK, FILEMARK } filetype_t;
+
+struct tapelabel {
+ char labelstr[MAXLINE];
+ time_t date;
+};
+typedef struct tapelabel tapelabel_t;
+
+struct fileheader {
+ char host[MAXLINE];
+ char vol[MAXLINE];
+ filetype_t type;
+ time_t date;
+};
+typedef struct fileheader fileheader_t;
+
+/* Access primitives. */
+int mt_rewind(int fd);
+int mt_fsf(int fd, int count);
+int mt_weof(int fd, int count);
+
+int readlabel(int fd, tapelabel_t *label);
+int writelabel(int fd, tapelabel_t *label);
+int readheader(int fd, fileheader_t *header);
+int writeheader(int fd, fileheader_t *header);
+
+#endif