- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * %sccs.include.redist.c%
-char copyright[] =
-"@(#) Copyright (c) 1983 Regents of the University of California.\n\
- All rights reserved.\n";
-#endif not lint
+static char copyright[] =
+"@(#) Copyright (c) 1983, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
#define SSIZE 64
char device[SSIZE];
char count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
#define SSIZE 64
char device[SSIZE];
char count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
FILE *debug;
#define DEBUG(f) if (debug) fprintf(debug, f)
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
FILE *debug;
#define DEBUG(f) if (debug) fprintf(debug, f)
#define DEBUG1(f,a) if (debug) fprintf(debug, f, a)
#define DEBUG2(f,a1,a2) if (debug) fprintf(debug, f, a1, a2)
DEBUG2("rmtd: O %s %s\n", device, mode);
tape = open(device, atoi(mode));
if (tape < 0)
DEBUG2("rmtd: O %s %s\n", device, mode);
tape = open(device, atoi(mode));
if (tape < 0)
- (void) sprintf(resp, "A%d\n", rval);
- (void) write(1, resp, strlen(resp));
- (void) write(1, record, rval);
+ (void)sprintf(resp, "A%d\n", rval);
+ (void)write(1, resp, strlen(resp));
+ (void)write(1, record, rval);
- (void) sprintf(resp, "A%d\n", rval);
- (void) write(1, resp, strlen(resp));
- (void) write(1, (char *)&mtget, sizeof (mtget));
+ (void)sprintf(resp, "A%d\n", rval);
+ (void)write(1, resp, strlen(resp));
+ (void)write(1, (char *)&mtget, sizeof (mtget));
- (void) sprintf(resp, "A%d\n", rval);
- (void) write(1, resp, strlen(resp));
+ (void)sprintf(resp, "A%d\n", rval);
+ (void)write(1, resp, strlen(resp));
while (size > 1024 &&
setsockopt(0, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) < 0)
size -= 1024;
return (record);
}
while (size > 1024 &&
setsockopt(0, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) < 0)
size -= 1024;
return (record);
}
- DEBUG2("rmtd: E %d (%s)\n", num, sys_errlist[num]);
- (void) sprintf(resp, "E%d\n%s\n", num, sys_errlist[num]);
- (void) write(1, resp, strlen (resp));
+ DEBUG2("rmtd: E %d (%s)\n", num, strerror(num));
+ (void)sprintf(resp, "E%d\n%s\n", num, strerror(num));
+ (void)write(1, resp, strlen(resp));