Fix sign-compare issues.
This commit is contained in:
parent
f8d0e3558c
commit
dadffc77c0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fstat.c,v 1.87 2008/12/29 00:59:08 christos Exp $ */
|
||||
/* $NetBSD: fstat.c,v 1.88 2009/04/12 06:36:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: fstat.c,v 1.87 2008/12/29 00:59:08 christos Exp $");
|
||||
__RCSID("$NetBSD: fstat.c,v 1.88 2009/04/12 06:36:12 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -519,7 +519,7 @@ vtrans(struct vnode *vp, int i, int flag)
|
|||
(void)snprintf(mode, sizeof mode, "%o", fst.mode);
|
||||
else
|
||||
strmode(fst.mode, mode);
|
||||
(void)printf(" %7lu %*s", (unsigned long)fst.fileid, nflg ? 5 : 10, mode);
|
||||
(void)printf(" %7"PRIu64" %*s", fst.fileid, nflg ? 5 : 10, mode);
|
||||
switch (vn.v_type) {
|
||||
case VBLK:
|
||||
case VCHR: {
|
||||
|
@ -580,7 +580,7 @@ ufs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
}
|
||||
|
||||
fsp->fsid = inode.i_dev & 0xffff;
|
||||
fsp->fileid = (long)inode.i_number;
|
||||
fsp->fileid = inode.i_number;
|
||||
fsp->mode = (mode_t)inode.i_mode;
|
||||
fsp->size = inode.i_size;
|
||||
|
||||
|
@ -599,7 +599,7 @@ ext2fs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
return 0;
|
||||
}
|
||||
fsp->fsid = inode.i_dev & 0xffff;
|
||||
fsp->fileid = (long)inode.i_number;
|
||||
fsp->fileid = inode.i_number;
|
||||
|
||||
if (!KVM_READ(&inode.i_e2fs_mode, &mode, sizeof mode)) {
|
||||
dprintf("can't read inode %p's mode at %p for pid %d", VTOI(vp),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fstat.h,v 1.8 2008/07/22 22:58:04 christos Exp $ */
|
||||
/* $NetBSD: fstat.h,v 1.9 2009/04/12 06:36:12 lukem Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
struct filestat {
|
||||
long fsid;
|
||||
long fileid;
|
||||
ino_t fileid;
|
||||
mode_t mode;
|
||||
off_t size;
|
||||
dev_t rdev;
|
||||
|
@ -40,7 +40,8 @@ struct filestat {
|
|||
* a kvm_read that returns true if everything is read
|
||||
*/
|
||||
#define KVM_READ(kaddr, paddr, len) \
|
||||
(kvm_read(kd, (u_long)(kaddr), (void *)(paddr), (len)) == (len))
|
||||
((size_t)kvm_read(kd, (u_long)(kaddr), (void *)(paddr), (len)) \
|
||||
== (size_t)(len))
|
||||
#define KVM_NLIST(nl) \
|
||||
kvm_nlist(kd, (nl))
|
||||
#define KVM_GETERR() \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isofs.c,v 1.6 2006/05/11 11:56:38 yamt Exp $ */
|
||||
/* $NetBSD: isofs.c,v 1.7 2009/04/12 06:36:12 lukem Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: isofs.c,v 1.6 2006/05/11 11:56:38 yamt Exp $");
|
||||
__RCSID("$NetBSD: isofs.c,v 1.7 2009/04/12 06:36:12 lukem Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -54,7 +54,7 @@ isofs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
return 0;
|
||||
}
|
||||
fsp->fsid = inode.i_dev & 0xffff;
|
||||
fsp->fileid = (long)inode.i_number;
|
||||
fsp->fileid = inode.i_number;
|
||||
fsp->mode = inode.inode.iso_mode;
|
||||
fsp->size = inode.i_size;
|
||||
fsp->rdev = inode.i_dev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: misc.c,v 1.3 2009/02/26 17:30:51 christos Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.4 2009/04/12 06:36:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: misc.c,v 1.3 2009/02/26 17:30:51 christos Exp $");
|
||||
__RCSID("$NetBSD: misc.c,v 1.4 2009/04/12 06:36:12 lukem Exp $");
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -149,7 +149,7 @@ pmisc(struct file *f, const char *name)
|
|||
warnx("Could not find %d symbols", n);
|
||||
}
|
||||
for (i = 0; i < NL_MAX; i++)
|
||||
if ((intptr_t)f->f_ops == nl[i].n_value)
|
||||
if ((uintptr_t)f->f_ops == nl[i].n_value)
|
||||
break;
|
||||
switch (i) {
|
||||
case NL_BPF:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ntfs.c,v 1.11 2008/04/28 20:24:12 martin Exp $ */
|
||||
/* $NetBSD: ntfs.c,v 1.12 2009/04/12 06:36:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: ntfs.c,v 1.11 2008/04/28 20:24:12 martin Exp $");
|
||||
__RCSID("$NetBSD: ntfs.c,v 1.12 2009/04/12 06:36:12 lukem Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -72,7 +72,7 @@ ntfs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
}
|
||||
|
||||
fsp->fsid = ntnode.i_dev & 0xffff;
|
||||
fsp->fileid = (long)ntnode.i_number;
|
||||
fsp->fileid = ntnode.i_number;
|
||||
fsp->mode = (mode_t)ntm.ntm_mode | getftype(vp->v_type);
|
||||
fsp->size = fn.f_size;
|
||||
fsp->rdev = 0; /* XXX */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ptyfs.c,v 1.5 2008/04/28 20:24:12 martin Exp $ */
|
||||
/* $NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: ptyfs.c,v 1.5 2008/04/28 20:24:12 martin Exp $");
|
||||
__RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -71,7 +71,7 @@ ptyfs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
return 0;
|
||||
}
|
||||
fsp->fsid = mt.mnt_stat.f_fsidx.__fsid_val[0];
|
||||
fsp->fileid = (long)pn.ptyfs_fileno;
|
||||
fsp->fileid = pn.ptyfs_fileno;
|
||||
fsp->mode = pn.ptyfs_mode;
|
||||
fsp->size = 0;
|
||||
switch (pn.ptyfs_type) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tmpfs.c,v 1.7 2008/07/29 09:10:09 pooka Exp $ */
|
||||
/* $NetBSD: tmpfs.c,v 1.8 2009/04/12 06:36:12 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: tmpfs.c,v 1.7 2008/07/29 09:10:09 pooka Exp $");
|
||||
__RCSID("$NetBSD: tmpfs.c,v 1.8 2009/04/12 06:36:12 lukem Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -61,7 +61,7 @@ tmpfs_filestat(struct vnode *vp, struct filestat *fsp)
|
|||
}
|
||||
|
||||
fsp->fsid = mt.mnt_stat.f_fsidx.__fsid_val[0];
|
||||
fsp->fileid = (long)tn.tn_id;
|
||||
fsp->fileid = tn.tn_id;
|
||||
fsp->mode = tn.tn_mode | getftype(vp->v_type);
|
||||
fsp->size = tn.tn_size;
|
||||
switch (tn.tn_type) {
|
||||
|
|
Loading…
Reference in New Issue