]> git.wh0rd.org - dump.git/blobdiff - common/dumprmt.c
Fixed a markup bug in dump man page.
[dump.git] / common / dumprmt.c
index 4d570fdd87eabdfd5f73fa991cc360e098a104cb..69ada17ac0980df2139c6f6a1ccfa7604db4af89 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: dumprmt.c,v 1.20 2002/01/25 15:08:59 stelian Exp $";
+       "$Id: dumprmt.c,v 1.22 2002/07/19 14:57:39 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -132,7 +132,7 @@ rmthost(const char *host)
 }
 
 static void
-rmtconnaborted(int signo)
+rmtconnaborted(UNUSED(int signo))
 {
        msg("Lost connection to remote host.\n");
        if (errfd != -1) {
@@ -273,11 +273,11 @@ okname(const char *cp0)
 }
 
 int
-rmtopen(const char *tape, int mode)
+rmtopen(const char *tape, const char *mode)
 {
        char buf[MAXPATHLEN];
 
-       (void)snprintf(buf, sizeof (buf), "O%s\n%d\n", tape, mode);
+       (void)snprintf(buf, sizeof (buf), "O%s\n%s\n", tape, mode);
        rmtstate = TS_OPEN;
        return (rmtcall(tape, buf));
 }
@@ -343,7 +343,7 @@ rmtstatus(void)
        if (rmtstate != TS_OPEN)
                return (NULL);
        rmtcall("status", "S\n");
-       for (i = 0, cp = (char *)&mts; i < sizeof(mts); i++)
+       for (i = 0, cp = (char *)&mts; i < (int)sizeof(mts); i++)
                *cp++ = rmtgetb();
        return (&mts);
 }
@@ -363,7 +363,7 @@ static int
 rmtcall(const char *cmd, const char *buf)
 {
 
-       if (write(tormtape, buf, strlen(buf)) != strlen(buf))
+       if (write(tormtape, buf, strlen(buf)) != (ssize_t)strlen(buf))
                rmtconnaborted(0);
        return (rmtreply(cmd));
 }