]> git.wh0rd.org - dump.git/blobdiff - rmt/rmt.c
Copyright notice for Alcôve, for paying me to work on dump...
[dump.git] / rmt / rmt.c
index 92353af4d2ee77ef3297ffd391ac683ed5b2a45f..7d5d29ab939bf06f16388775600d03821c7bbfb3 100644 (file)
--- a/rmt/rmt.c
+++ b/rmt/rmt.c
@@ -2,8 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *      Stelian Pop <pop@cybercable.fr>, 1999 
- *
+ *     Stelian Pop <pop@cybercable.fr>, 1999-2000
+ *     Stelian Pop <pop@cybercable.fr> - Alcôve <www.alcove.fr>, 2000
  */
 
 /*
  */
 
 #ifndef lint
-static const char copyright[] =
-"@(#) Copyright (c) 1983, 1993\n\
-       The Regents of the University of California.  All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)rmt.c      8.1 (Berkeley) 6/6/93";
-#endif
 static const char rcsid[] =
-       "$Id: rmt.c,v 1.3 1999/10/11 12:59:21 stelian Exp $";
-#endif /* not lint */
+       "$Id: rmt.c,v 1.10 2000/11/10 14:51:42 stelian Exp $";
+#endif /* not linux */
 
 /*
  * rmt
@@ -61,18 +52,14 @@ static const char rcsid[] =
 #include <sys/mtio.h>
 #include <errno.h>
 #include <fcntl.h>
+#ifndef __linux__
 #include <sgtty.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
-#ifdef __linux__
-#include <linux/ext2_fs.h>
-#include <ext2fs/ext2fs.h>
-#include <bsdcompat.h>
-#endif
-
 int    tape = -1;
 
 char   *record;
@@ -80,7 +67,7 @@ int   maxrecsize = -1;
 
 #define        SSIZE   64
 char   device[SSIZE];
-char   count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
+char   count[SSIZE], filemode[SSIZE], pos[SSIZE], op[SSIZE];
 
 char   resp[BUFSIZ];
 
@@ -118,14 +105,14 @@ top:
                if (tape >= 0)
                        (void) close(tape);
                getstring(device);
-               getstring(mode);
-               DEBUG2("rmtd: O %s %s\n", device, mode);
+               getstring(filemode);
+               DEBUG2("rmtd: O %s %s\n", device, filemode);
                /*
                 * XXX the rmt protocol does not provide a means to
                 * specify the permission bits; allow rw for everyone,
                 * as modified by the users umask
                 */
-               tape = open(device, atoi(mode), 0666);
+               tape = open(device, atoi(filemode), 0666);
                if (tape < 0)
                        goto ioerror;
                goto respond;