From 95d7b084a90bd702e7a0ac950d6e589fcf67ad92 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 28 Jan 2011 11:04:38 +0100 Subject: [PATCH] fstat(1): Raise WARNS to 6 and fix all warnings. --- usr.bin/fstat/Makefile | 2 -- usr.bin/fstat/cd9660.c | 5 +---- usr.bin/fstat/fstat.c | 4 +++- usr.bin/fstat/msdosfs.c | 4 +--- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile index ee1d43f617..cd2fa754ca 100644 --- a/usr.bin/fstat/Makefile +++ b/usr.bin/fstat/Makefile @@ -1,6 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD: src/usr.bin/fstat/Makefile,v 1.4.2.1 2000/07/02 10:20:24 ps Exp $ -# $DragonFly: src/usr.bin/fstat/Makefile,v 1.5 2008/11/03 00:25:45 pavalos Exp $ PROG= fstat SRCS= cd9660.c fstat.c msdosfs.c @@ -9,6 +8,5 @@ DPADD= ${LIBKVM} LDADD= -lkvm BINGRP= kmem BINMODE=2555 -WARNS?= 0 .include diff --git a/usr.bin/fstat/cd9660.c b/usr.bin/fstat/cd9660.c index 9208c5d624..335f24f15e 100644 --- a/usr.bin/fstat/cd9660.c +++ b/usr.bin/fstat/cd9660.c @@ -34,7 +34,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/fstat/cd9660.c,v 1.1.2.3 2001/11/21 10:49:37 dwmalone Exp $ - * $DragonFly: src/usr.bin/fstat/cd9660.c,v 1.6 2006/04/25 16:37:44 dillon Exp $ */ /* @@ -68,10 +67,8 @@ isofs_filestat(struct vnode *vp, struct filestat *fsp) (void *)VTOI(vp), Pid); return 0; } - fsp->fsid = dev2udev(isonode.i_dev); + fsp->fsid = fsp->rdev = dev2udev(isonode.i_dev); fsp->mode = (mode_t)isonode.inode.iso_mode; - fsp->rdev = isonode.i_dev; - fsp->fileid = (long)isonode.i_number; fsp->size = isonode.i_size; return 1; diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index deef895f91..7b44a73810 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -272,7 +272,8 @@ main(int argc, char **argv) exit(0); } -char *Uname, *Comm; +const char *Uname; +char *Comm; int Pid; #define PREFIX(i) \ @@ -628,6 +629,7 @@ nfs_filestat(struct vnode *vp, struct filestat *fsp) break; case VDATABASE: break; + case VINT: case VNON: case VBAD: return 0; diff --git a/usr.bin/fstat/msdosfs.c b/usr.bin/fstat/msdosfs.c index 0fdec718d0..99d92a094c 100644 --- a/usr.bin/fstat/msdosfs.c +++ b/usr.bin/fstat/msdosfs.c @@ -34,7 +34,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/fstat/msdosfs.c,v 1.1.2.2 2001/11/21 10:49:37 dwmalone Exp $ - * $DragonFly: src/usr.bin/fstat/msdosfs.c,v 1.7 2006/04/25 16:37:44 dillon Exp $ */ #define _KERNEL_STRUCTURES @@ -109,7 +108,7 @@ msdosfs_filestat(struct vnode *vp, struct filestat *fsp) } } - fsp->fsid = dev2udev(denode.de_dev); + fsp->fsid = fsp->rdev = dev2udev(denode.de_dev); fsp->mode = 0555; fsp->mode |= denode.de_Attributes & ATTR_READONLY ? 0 : 0222; fsp->mode &= mnt->data.pm_mask; @@ -118,7 +117,6 @@ msdosfs_filestat(struct vnode *vp, struct filestat *fsp) fsp->mode |= denode.de_Attributes & ATTR_DIRECTORY ? S_IFDIR : S_IFREG; fsp->size = denode.de_FileSize; - fsp->rdev = denode.de_dev; /* * XXX - -- 2.41.0