Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/fstat Make it compile again on LP64 archs.



details:   https://anonhg.NetBSD.org/src/rev/31fcae9a7c57
branches:  trunk
changeset: 541965:31fcae9a7c57
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 20 06:20:37 2003 +0000

description:
Make it compile again on LP64 archs.
XXX - we *realy* need some format string macros for size_t/off_t!

diffstat:

 usr.bin/fstat/fstat.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 86957fdb74a9 -r 31fcae9a7c57 usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Mon Jan 20 05:29:53 2003 +0000
+++ b/usr.bin/fstat/fstat.c     Mon Jan 20 06:20:37 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.58 2003/01/19 18:14:06 dsl Exp $   */
+/*     $NetBSD: fstat.c,v 1.59 2003/01/20 06:20:37 martin Exp $        */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)fstat.c    8.3 (Berkeley) 5/2/95";
 #else
-__RCSID("$NetBSD: fstat.c,v 1.58 2003/01/19 18:14:06 dsl Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.59 2003/01/20 06:20:37 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -326,16 +326,16 @@
        if (p->p_fd == NULL || p->p_cwdi == NULL)
                return;
        if (!KVM_READ(p->p_fd, &filed0, sizeof (filed0))) {
-               warnx("can't read filedesc at %#llx for pid %d", p->p_fd, Pid);
+               warnx("can't read filedesc at %#llx for pid %d", (unsigned long long)p->p_fd, Pid);
                return;
        }
        if (!KVM_READ(p->p_cwdi, &cwdi, sizeof(cwdi))) {
-               warnx("can't read cwdinfo at %#llx for pid %d", p->p_cwdi, Pid);
+               warnx("can't read cwdinfo at %#llx for pid %d", (unsigned long long)p->p_cwdi, Pid);
                return;
        }
        if (filed.fd_nfiles < 0 || filed.fd_lastfile >= filed.fd_nfiles ||
            filed.fd_freefile > filed.fd_lastfile + 1) {
-               dprintf("filedesc corrupted at %#llx for pid %d", p->p_fd, Pid);
+               dprintf("filedesc corrupted at %#llx for pid %d", (unsigned long long)p->p_fd, Pid);
                return;
        }
        /*



Home | Main Index | Thread Index | Old Index