diff --git a/bin/ps/print.c b/bin/ps/print.c index a318be51304b..bcf026125895 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.106 2008/10/19 02:39:08 christos Exp $ */ +/* $NetBSD: print.c,v 1.107 2008/12/28 19:50:22 christos Exp $ */ /* * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -__RCSID("$NetBSD: print.c,v 1.106 2008/10/19 02:39:08 christos Exp $"); +__RCSID("$NetBSD: print.c,v 1.107 2008/12/28 19:50:22 christos Exp $"); #endif #endif /* not lint */ @@ -718,7 +718,7 @@ tdev(void *arg, VARENT *ve, int mode) v->width = 2; } else { (void)snprintf(buff, sizeof(buff), - "%d/%d", major(dev), minor(dev)); + "%lld/%lld", (long long)major(dev), (long long)minor(dev)); strprintorsetwidth(v, buff, mode); } } diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 2b08edb61498..482465afe610 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1,4 +1,4 @@ -/* $NetBSD: ps.c,v 1.71 2008/09/26 13:02:42 wiz Exp $ */ +/* $NetBSD: ps.c,v 1.72 2008/12/28 19:50:22 christos Exp $ */ /* * Copyright (c) 2000-2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\ #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: ps.c,v 1.71 2008/09/26 13:02:42 wiz Exp $"); +__RCSID("$NetBSD: ps.c,v 1.72 2008/12/28 19:50:22 christos Exp $"); #endif #endif /* not lint */ @@ -152,7 +152,8 @@ main(int argc, char *argv[]) struct varent *vent; struct winsize ws; struct kinfo_lwp *kl, *l; - int ch, flag, i, j, fmt, lineno, nentries, nlwps; + int ch, i, j, fmt, lineno, nentries, nlwps; + long long flag; int prtheader, wflag, what, xflg, mode, showlwps; char *nlistf, *memf, *swapf, errbuf[_POSIX2_LINE_MAX]; char *ttname; @@ -414,7 +415,7 @@ main(int argc, char *argv[]) for (i = 0; i < nentries; i++) { struct kinfo_proc2 *ki = &kinfo[i]; - if (xflg == 0 && (ki->p_tdev == NODEV || + if (xflg == 0 && (ki->p_tdev == (uint32_t)NODEV || (ki->p_flag & P_CONTROLT) == 0)) continue; @@ -450,7 +451,7 @@ main(int argc, char *argv[]) for (i = lineno = 0; i < nentries; i++) { struct kinfo_proc2 *ki = &kinfo[i]; - if (xflg == 0 && (ki->p_tdev == NODEV || + if (xflg == 0 && (ki->p_tdev == (uint32_t)NODEV || (ki->p_flag & P_CONTROLT ) == 0)) continue; kl = kvm_getlwps(kd, ki->p_pid, (u_long)ki->p_paddr,