projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lint
[unix-history]
/
usr
/
src
/
sbin
/
dump
/
dumprmt.c
diff --git
a/usr/src/sbin/dump/dumprmt.c
b/usr/src/sbin/dump/dumprmt.c
index
d3c06a6
..
71a002b
100644
(file)
--- a/
usr/src/sbin/dump/dumprmt.c
+++ b/
usr/src/sbin/dump/dumprmt.c
@@
-1,25
+1,47
@@
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1980 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)dumprmt.c 5.
8
(Berkeley) %G%";
-#endif
not lint
+static char sccsid[] = "@(#)dumprmt.c 5.
14
(Berkeley) %G%";
+#endif
/* not lint */
+#ifdef sunos
+#include <stdio.h>
+#include <ctype.h>
#include <sys/param.h>
#include <sys/mtio.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <sys/mtio.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <ufs/dinode.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/dir.h>
+#include <sys/vnode.h>
+#include <ufs/inode.h>
+#else
+#include <sys/param.h>
+#include <sys/mtio.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <ufs/ufs/dinode.h>
+#include <stdio.h>
+#endif
+#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
#include <protocols/dumprestore.h>
#include <pwd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <protocols/dumprestore.h>
#include <pwd.h>
-#include <stdio.h>
+#ifdef __STDC__
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#endif
#include "pathnames.h"
#define TS_CLOSED 0
#include "pathnames.h"
#define TS_CLOSED 0
@@
-27,11
+49,18
@@
static char sccsid[] = "@(#)dumprmt.c 5.8 (Berkeley) %G%";
static int rmtstate = TS_CLOSED;
int rmtape;
static int rmtstate = TS_CLOSED;
int rmtape;
-int rmtconnaborted();
+void rmtgetconn();
+void rmtconnaborted();
+int rmtreply();
+int rmtgetb();
+void rmtgets();
+int rmtcall();
char *rmtpeer;
extern int ntrec; /* blocking factor on tape */
char *rmtpeer;
extern int ntrec; /* blocking factor on tape */
+extern void msg();
+int
rmthost(host)
char *host;
{
rmthost(host)
char *host;
{
@@
-44,6
+73,7
@@
rmthost(host)
return (1);
}
return (1);
}
+void
rmtconnaborted()
{
rmtconnaborted()
{
@@
-51,6
+81,7
@@
rmtconnaborted()
exit(1);
}
exit(1);
}
+void
rmtgetconn()
{
static struct servent *sp = 0;
rmtgetconn()
{
static struct servent *sp = 0;
@@
-75,6
+106,7
@@
rmtgetconn()
size -= TP_BSIZE;
}
size -= TP_BSIZE;
}
+int
rmtopen(tape, mode)
char *tape;
int mode;
rmtopen(tape, mode)
char *tape;
int mode;
@@
-86,6
+118,7
@@
rmtopen(tape, mode)
return (rmtcall(tape, buf));
}
return (rmtcall(tape, buf));
}
+void
rmtclose()
{
rmtclose()
{
@@
-95,6
+128,7
@@
rmtclose()
rmtstate = TS_CLOSED;
}
rmtstate = TS_CLOSED;
}
+int
rmtread(buf, count)
char *buf;
int count;
rmtread(buf, count)
char *buf;
int count;
@@
-118,6
+152,7
@@
rmtread(buf, count)
return (n);
}
return (n);
}
+int
rmtwrite(buf, count)
char *buf;
int count;
rmtwrite(buf, count)
char *buf;
int count;
@@
-130,6
+165,7
@@
rmtwrite(buf, count)
return (rmtreply("write"));
}
return (rmtreply("write"));
}
+void
rmtwrite0(count)
int count;
{
rmtwrite0(count)
int count;
{
@@
-139,6
+175,7
@@
rmtwrite0(count)
write(rmtape, line, strlen(line));
}
write(rmtape, line, strlen(line));
}
+void
rmtwrite1(buf, count)
char *buf;
int count;
rmtwrite1(buf, count)
char *buf;
int count;
@@
-147,13
+184,14
@@
rmtwrite1(buf, count)
write(rmtape, buf, count);
}
write(rmtape, buf, count);
}
+int
rmtwrite2()
{
rmtwrite2()
{
- int i;
return (rmtreply("write"));
}
return (rmtreply("write"));
}
+int
rmtseek(offset, pos)
int offset, pos;
{
rmtseek(offset, pos)
int offset, pos;
{
@@
-179,6
+217,7
@@
rmtstatus()
return (&mts);
}
return (&mts);
}
+int
rmtioctl(cmd, count)
int cmd, count;
{
rmtioctl(cmd, count)
int cmd, count;
{
@@
-190,6
+229,7
@@
rmtioctl(cmd, count)
return (rmtcall("ioctl", buf));
}
return (rmtcall("ioctl", buf));
}
+int
rmtcall(cmd, buf)
char *cmd, *buf;
{
rmtcall(cmd, buf)
char *cmd, *buf;
{
@@
-199,10
+239,10
@@
rmtcall(cmd, buf)
return (rmtreply(cmd));
}
return (rmtreply(cmd));
}
+int
rmtreply(cmd)
char *cmd;
{
rmtreply(cmd)
char *cmd;
{
- register int c;
char code[30], emsg[BUFSIZ];
rmtgets(code, sizeof (code));
char code[30], emsg[BUFSIZ];
rmtgets(code, sizeof (code));
@@
-223,6
+263,7
@@
rmtreply(cmd)
return (atoi(code + 1));
}
return (atoi(code + 1));
}
+int
rmtgetb()
{
char c;
rmtgetb()
{
char c;
@@
-232,6
+273,7
@@
rmtgetb()
return (c);
}
return (c);
}
+void
rmtgets(cp, len)
char *cp;
int len;
rmtgets(cp, len)
char *cp;
int len;