summaryrefslogtreecommitdiff
path: root/bin/mt/mtrmt.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-15 20:14:19 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-15 20:14:19 +0000
commit63d968aec62237fc11392b0303911e8cc7d60401 (patch)
tree9ab755d2c658ece6644dfe1957b5ab7a5476940e /bin/mt/mtrmt.c
parent427c08245b571d89184893d2fea6e7fcca6b49c5 (diff)
Don't complain if setsockopt() fails. It will fail if we used rcmdsh()
instead of rcmd() and there's no easy way to detect which we used now.
Diffstat (limited to 'bin/mt/mtrmt.c')
-rw-r--r--bin/mt/mtrmt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/mt/mtrmt.c b/bin/mt/mtrmt.c
index 5629272cd42..26f68ae64df 100644
--- a/bin/mt/mtrmt.c
+++ b/bin/mt/mtrmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtrmt.c,v 1.4 1996/09/02 05:37:11 deraadt Exp $ */
+/* $OpenBSD: mtrmt.c,v 1.5 1996/09/15 20:14:18 millert Exp $ */
/* $NetBSD: mtrmt.c,v 1.2 1996/03/06 06:22:07 scottr Exp $ */
/*-
@@ -160,9 +160,8 @@ rmtgetconn()
(void)setsockopt(rmtape, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size));
maxseg = 1024;
- if (getuid() == 0 && setsockopt(rmtape, IPPROTO_TCP, TCP_MAXSEG,
- &maxseg, sizeof (maxseg)) < 0)
- perror("TCP_MAXSEG setsockopt");
+ (void)setsockopt(rmtape, IPPROTO_TCP, TCP_MAXSEG, &maxseg,
+ sizeof (maxseg));
#ifdef notdef
if (setsockopt(rmtape, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)) < 0)
@@ -194,7 +193,7 @@ rmtopen(tape, mode)
{
char buf[256];
- (void)snprintf(buf, sizeof(buf), "O%s\n%d\n", tape, mode);
+ (void)snprintf(buf, sizeof (buf), "O%s\n%d\n", tape, mode);
rmtstate = TS_OPEN;
return (rmtcall(tape, buf));
}
@@ -233,7 +232,7 @@ rmtioctl(cmd, count)
if (count < 0)
return (-1);
- (void)snprintf(buf, sizeof(buf), "I%d\n%d\n", cmd, count);
+ (void)snprintf(buf, sizeof (buf), "I%d\n%d\n", cmd, count);
return (rmtcall("ioctl", buf));
}