summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorkleink <kleink@NetBSD.org>1997-08-25 19:31:43 +0000
committerkleink <kleink@NetBSD.org>1997-08-25 19:31:43 +0000
commit66105c37fcb6efa0299b0ca40aad00c5ec51568c (patch)
treed77052b170786a222d8fe2feedd0e1ea595bf98c /libexec
parentb2c3b768d341d3f991bdb0071748a8469d7c753e (diff)
Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/comsat/comsat.c6
-rw-r--r--libexec/ftpd/ftpd.c8
-rw-r--r--libexec/rpc.rquotad/rquotad.c5
-rw-r--r--libexec/telnetd/sys_term.c7
4 files changed, 14 insertions, 12 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c
index a5aa9f37509..e39b26e64b0 100644
--- a/libexec/comsat/comsat.c
+++ b/libexec/comsat/comsat.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/
-static char rcsid[] = "$Id: comsat.c,v 1.8 1995/05/02 02:05:47 mycroft Exp $";
+static char rcsid[] = "$Id: comsat.c,v 1.9 1997/08/25 19:31:47 kleink Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -164,7 +164,7 @@ onalrm(signo)
exit(1);
}
}
- (void)lseek(uf, (off_t)0, L_SET);
+ (void)lseek(uf, (off_t)0, SEEK_SET);
nutmp = read(uf, utmp, (int)statbf.st_size)/sizeof(struct utmp);
}
}
@@ -249,7 +249,7 @@ jkfprintf(tp, name, offset)
if ((fi = fopen(name, "r")) == NULL)
return;
- (void)fseek(fi, offset, L_SET);
+ (void)fseek(fi, offset, SEEK_SET);
/*
* Print the first 7 lines or 560 characters of the new mail
* (whichever comes first). Skip header crap other than
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 15a9c94ca57..0f18661c87c 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.30 1997/08/14 02:06:17 lukem Exp $ */
+/* $NetBSD: ftpd.c,v 1.31 1997/08/25 19:31:48 kleink Exp $ */
/*
* Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
@@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.30 1997/08/14 02:06:17 lukem Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.31 1997/08/25 19:31:48 kleink Exp $");
#endif
#endif /* not lint */
@@ -793,7 +793,7 @@ retrieve(cmd, name)
if (c == '\n')
i++;
}
- } else if (lseek(fileno(fin), restart_point, L_SET) < 0) {
+ } else if (lseek(fileno(fin), restart_point, SEEK_SET) < 0) {
perror_reply(550, name);
goto done;
}
@@ -860,7 +860,7 @@ store(name, mode, unique)
perror_reply(550, name);
goto done;
}
- } else if (lseek(fileno(fout), restart_point, L_SET) < 0) {
+ } else if (lseek(fileno(fout), restart_point, SEEK_SET) < 0) {
perror_reply(550, name);
goto done;
}
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index f8c19f81143..31d71938210 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rquotad.c,v 1.7 1996/08/30 20:15:10 thorpej Exp $ */
+/* $NetBSD: rquotad.c,v 1.8 1997/08/25 19:31:50 kleink Exp $ */
/*
* by Manuel Bouyer (bouyer@ensta.fr)
@@ -269,7 +269,8 @@ getfsquota(id, path, dqblk)
syslog(LOG_ERR, "open error: %s: %m", fs->qfpathname);
return (0);
}
- if (lseek(fd, (off_t)(id * sizeof(struct dqblk)), L_SET) == (off_t)-1) {
+ if (lseek(fd, (off_t)(id * sizeof(struct dqblk)), SEEK_SET)
+ == (off_t)-1) {
close(fd);
return (1);
}
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index 50fbc3b8175..62513b9d81a 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */
+/* $NetBSD: sys_term.c,v 1.10 1997/08/25 19:31:51 kleink Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
#else
-static char rcsid[] = "$NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $";
+static char rcsid[] = "$NetBSD: sys_term.c,v 1.10 1997/08/25 19:31:51 kleink Exp $";
#endif
#endif /* not lint */
@@ -2259,7 +2259,8 @@ rmut()
if (SCMPN(u->ut_line, line+5) ||
u->ut_name[0]==0)
continue;
- (void) lseek(f, ((long)u)-((long)utmp), L_SET);
+ (void)lseek(f, (off_t)((long)u)-((long)utmp),
+ SEEK_SET);
SCPYN(u->ut_name, "");
SCPYN(u->ut_host, "");
(void) time(&u->ut_time);