X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=rmt%2Frmt.c;h=f52c36ba8b602b38c632457a4cd9b5fc9adee081;hb=c930abff2469b9571a22fc49d16f50f36f5a9301;hp=92353af4d2ee77ef3297ffd391ac683ed5b2a45f;hpb=ddd2ef55b78a62c4bc3daad18bef8a90e85a2052;p=dump.git diff --git a/rmt/rmt.c b/rmt/rmt.c index 92353af..f52c36b 100644 --- a/rmt/rmt.c +++ b/rmt/rmt.c @@ -2,8 +2,7 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999 - * + * Stelian Pop , 1999 */ /* @@ -40,18 +39,9 @@ */ #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.8 1999/11/21 02:24:47 tiniou Exp $"; +#endif /* not linux */ /* * rmt @@ -61,18 +51,14 @@ static const char rcsid[] = #include #include #include +#ifndef __linux__ #include +#endif #include #include #include #include -#ifdef __linux__ -#include -#include -#include -#endif - int tape = -1; char *record; @@ -80,7 +66,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 +104,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;