summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck/preen.c7
-rw-r--r--sbin/fsck_ext2fs/preen.c9
-rw-r--r--sbin/isakmpd/isakmpd.c4
-rw-r--r--sbin/isakmpd/pf_key_v2.c6
-rw-r--r--sbin/mount_portal/mount_portal.c6
-rw-r--r--sbin/mountd/mountd.c4
-rw-r--r--sbin/newfs/newfs.c6
-rw-r--r--sbin/route/route.c8
-rw-r--r--sbin/routed/table.c4
-rw-r--r--sbin/shutdown/shutdown.c8
-rw-r--r--sbin/slattach/slattach.c6
11 files changed, 35 insertions, 33 deletions
diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c
index 746e85c614f..f832e330c77 100644
--- a/sbin/fsck/preen.c
+++ b/sbin/fsck/preen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preen.c,v 1.9 2002/03/14 06:51:41 mpech Exp $ */
+/* $OpenBSD: preen.c,v 1.10 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: preen.c,v 1.15 1996/09/28 19:21:42 christos Exp $ */
/*
@@ -94,9 +94,10 @@ checkfstab(flags, maxrun, docheck, checkit)
struct fstab *fs;
struct diskentry *d, *nextdisk;
struct partentry *p;
- int ret, pid, retcode, passno, sumstatus, status;
+ int ret, retcode, passno, sumstatus, status;
void *auxarg;
char *name;
+ pid_t pid;
TAILQ_INIT(&badh);
TAILQ_INIT(&diskh);
@@ -165,7 +166,7 @@ checkfstab(flags, maxrun, docheck, checkit)
break;
if (d == NULL) {
- warnx("Unknown pid %d", pid);
+ warnx("Unknown pid %ld", (long)pid);
continue;
}
diff --git a/sbin/fsck_ext2fs/preen.c b/sbin/fsck_ext2fs/preen.c
index a235d4205e7..408342c268d 100644
--- a/sbin/fsck_ext2fs/preen.c
+++ b/sbin/fsck_ext2fs/preen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preen.c,v 1.6 2002/02/17 19:42:27 millert Exp $ */
+/* $OpenBSD: preen.c,v 1.7 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: preen.c,v 1.2 1997/09/14 14:27:30 lukem Exp $ */
/*
@@ -56,7 +56,7 @@ struct disk {
char *name; /* disk base name */
struct disk *next; /* forward link for list of disks */
struct part *part; /* head of list of partitions on disk */
- int pid; /* If != 0, pid of proc working on */
+ pid_t pid; /* If != 0, pid of proc working on */
} *disks;
int nrun, ndisks;
@@ -74,9 +74,10 @@ checkfstab(preen, maxrun, docheck, chkit)
struct fstab *fsp;
struct disk *dk, *nextdisk;
struct part *pt;
- int ret, pid, retcode, passno, sumstatus, status;
+ int ret, retcode, passno, sumstatus, status;
long auxdata;
char *name;
+ pid_t pid;
sumstatus = 0;
for (passno = 1; passno <= 2; passno++) {
@@ -126,7 +127,7 @@ checkfstab(preen, maxrun, docheck, chkit)
if (dk->pid == pid)
break;
if (dk == 0) {
- printf("Unknown pid %d\n", pid);
+ printf("Unknown pid %ld\n", (long)pid);
continue;
}
if (WIFEXITED(status))
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index add4ba90767..13c26121018 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.39 2001/12/11 01:54:34 ho Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.40 2002/05/26 09:24:35 deraadt Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -333,7 +333,7 @@ write_pid_file (void)
if (fp != NULL)
{
/* XXX Error checking! */
- fprintf (fp, "%d\n", getpid ());
+ fprintf (fp, "%ld\n", (long) getpid ());
fclose (fp);
}
else
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index c20ef22b4af..d2fe21a1fd2 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.97 2002/02/21 20:12:56 angelos Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.98 2002/05/26 09:24:35 deraadt Exp $ */
/* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */
/*
@@ -379,8 +379,8 @@ pf_key_v2_read (u_int32_t seq)
{
LOG_DBG ((LOG_SYSDEP, 90,
"pf_key_v2_read:"
- "bad version (%d) or PID (%d, mine is %d), ignored",
- msg->sadb_msg_version, msg->sadb_msg_pid,
+ "bad version (%d) or PID (%ld, mine is %d), ignored",
+ msg->sadb_msg_version, (long)msg->sadb_msg_pid,
getpid ()));
goto cleanup;
}
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index ab7511eceef..38dd40697cd 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_portal.c,v 1.19 2002/05/22 08:21:02 deraadt Exp $ */
+/* $OpenBSD: mount_portal.c,v 1.20 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
-static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.19 2002/05/22 08:21:02 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.20 2002/05/26 09:24:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -194,7 +194,7 @@ main(argc, argv)
*/
daemon(0, 0);
- (void)snprintf(tag, sizeof(tag), "portal:%d", getpid());
+ (void)snprintf(tag, sizeof(tag), "portal:%ld", (long)getpid());
args.pa_config = tag;
/*
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index 42a4ef92177..e4a420f5c72 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mountd.c,v 1.45 2002/04/23 18:54:12 espie Exp $ */
+/* $OpenBSD: mountd.c,v 1.46 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */
/*
@@ -285,7 +285,7 @@ main(argc, argv)
} else {
pidfile = fopen(_PATH_MOUNTDPID, "w");
}
- fprintf(pidfile, "%d\n", getpid());
+ fprintf(pidfile, "%ld\n", (long)getpid());
fclose(pidfile);
signal(SIGHUP, (void (*)(int)) new_exportlist);
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 3ccea89e879..db1ceb4403d 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.34 2002/05/06 19:25:06 millert Exp $ */
+/* $OpenBSD: newfs.c,v 1.35 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)newfs.c 8.8 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: newfs.c,v 1.34 2002/05/06 19:25:06 millert Exp $";
+static char rcsid[] = "$OpenBSD: newfs.c,v 1.35 2002/05/26 09:24:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -589,7 +589,7 @@ havelabel:
if (mfs) {
struct mfs_args args;
- sprintf(buf, "mfs:%d", getpid());
+ sprintf(buf, "mfs:%ld", (long)getpid());
args.fspec = buf;
args.export_info.ex_root = -2;
if (mntflags & MNT_RDONLY)
diff --git a/sbin/route/route.c b/sbin/route/route.c
index b1df9d868b8..6750a6e2264 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.45 2002/05/20 23:06:27 itojun Exp $ */
+/* $OpenBSD: route.c,v 1.46 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: route.c,v 1.45 2002/05/20 23:06:27 itojun Exp $";
+static char rcsid[] = "$OpenBSD: route.c,v 1.46 2002/05/26 09:24:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -1492,8 +1492,8 @@ print_rtmsg(rtm, msglen)
pmsg_addrs((char *)(ifam + 1), ifam->ifam_addrs);
break;
default:
- (void) printf("pid: %d, seq %d, errno %d, flags:",
- rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);
+ (void) printf("pid: %ld, seq %d, errno %d, flags:",
+ (long)rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);
bprintf(stdout, rtm->rtm_flags, routeflags);
pmsg_common(rtm);
}
diff --git a/sbin/routed/table.c b/sbin/routed/table.c
index 2aefbbc9ea7..584ff692e12 100644
--- a/sbin/routed/table.c
+++ b/sbin/routed/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.7 2002/03/14 16:44:24 mpech Exp $ */
+/* $OpenBSD: table.c,v 1.8 2002/05/26 09:24:35 deraadt Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -1091,7 +1091,7 @@ read_rt(void)
strcpy(str, rtm_type_name(m.r.rtm.rtm_type));
strp = &str[strlen(str)];
if (m.r.rtm.rtm_type <= RTM_CHANGE)
- strp += sprintf(strp," from pid %d",m.r.rtm.rtm_pid);
+ strp += sprintf(strp," from pid %ld", (long)m.r.rtm.rtm_pid);
rt_xaddrs(&info, m.r.addrs, &m.r.addrs[RTAX_MAX],
m.r.rtm.rtm_addrs);
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index bd8770f1fa4..71a01c6f3f4 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shutdown.c,v 1.24 2002/02/16 21:27:38 millert Exp $ */
+/* $OpenBSD: shutdown.c,v 1.25 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#else
-static char rcsid[] = "$OpenBSD: shutdown.c,v 1.24 2002/02/16 21:27:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: shutdown.c,v 1.25 2002/05/26 09:24:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -229,13 +229,13 @@ main(argc, argv)
#else
(void)setpriority(PRIO_PROCESS, 0, PRIO_MIN);
{
- int forkpid;
+ pid_t forkpid;
forkpid = fork();
if (forkpid == -1)
err(1, "fork");
if (forkpid) {
- (void)printf("shutdown: [pid %d]\n", forkpid);
+ (void)printf("shutdown: [pid %ld]\n", (long)forkpid);
exit(0);
}
}
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c
index 0a8bd7280fb..10aa62fe797 100644
--- a/sbin/slattach/slattach.c
+++ b/sbin/slattach/slattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slattach.c,v 1.12 2002/02/16 21:27:38 millert Exp $ */
+/* $OpenBSD: slattach.c,v 1.13 2002/05/26 09:24:35 deraadt Exp $ */
/* $NetBSD: slattach.c,v 1.17 1996/05/19 21:57:39 jonathan Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)slattach.c 8.2 (Berkeley) 1/7/94";
#else
-static char rcsid[] = "$OpenBSD: slattach.c,v 1.12 2002/02/16 21:27:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: slattach.c,v 1.13 2002/05/26 09:24:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -168,7 +168,7 @@ main(argc, argv)
"%sslip.%s.pid", _PATH_VARRUN, dev + i);
truncate(pidfilename, 0); /* If this fails, so will the next one... */
if ((pidfile = fopen(pidfilename, "w")) != NULL) {
- fprintf(pidfile, "%d\n", pid);
+ fprintf(pidfile, "%ld\n", (long)pid);
(void) fclose(pidfile);
} else {
syslog(LOG_ERR, "Failed to create pid file %s: %m", pidfilename);