diff options
author | phk <phk@FreeBSD.org> | 1994-10-10 07:55:48 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1994-10-10 07:55:48 +0000 |
commit | c0f48e68d284829328ce49fd16a2b2eb6467434b (patch) | |
tree | 7554aaa733a10acfa4773a846448e6f66d2d6ee3 /sys/fs/procfs | |
parent | 03a02ed1752db367223cc17d6465dcb08f262939 (diff) | |
download | FreeBSD-src-c0f48e68d284829328ce49fd16a2b2eb6467434b.zip FreeBSD-src-c0f48e68d284829328ce49fd16a2b2eb6467434b.tar.gz |
Cosmetics. reduce the noise from gcc -Wall.
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs_status.c | 10 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 17 |
3 files changed, 19 insertions, 13 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 1792dfd..c74cde9 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -36,7 +36,7 @@ * * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94 * - * $Id: procfs_status.c,v 1.1.1.1 1994/05/24 10:05:08 rgrimes Exp $ + * $Id: procfs_status.c,v 1.2 1994/08/02 07:45:20 davidg Exp $ */ #include <sys/param.h> @@ -104,7 +104,7 @@ procfs_dostatus(curp, p, pfs, uio) ps += sprintf(ps, "noflags"); if (p->p_flag & P_INMEM) - ps += sprintf(ps, " %d,%d", + ps += sprintf(ps, " %ld,%ld", p->p_stats->p_start.tv_sec, p->p_stats->p_start.tv_usec); else @@ -114,7 +114,7 @@ procfs_dostatus(curp, p, pfs, uio) struct timeval ut, st; calcru(p, &ut, &st, (void *) 0); - ps += sprintf(ps, " %d,%d %d,%d", + ps += sprintf(ps, " %ld,%ld %ld,%ld", ut.tv_sec, ut.tv_usec, st.tv_sec, @@ -126,9 +126,9 @@ procfs_dostatus(curp, p, pfs, uio) cr = p->p_ucred; - ps += sprintf(ps, " %d", cr->cr_uid, cr->cr_gid); + ps += sprintf(ps, " %ld %ld", cr->cr_uid, cr->cr_gid); for (i = 0; i < cr->cr_ngroups; i++) - ps += sprintf(ps, ",%d", cr->cr_groups[i]); + ps += sprintf(ps, ",%ld", cr->cr_groups[i]); ps += sprintf(ps, "\n"); xlen = ps - psbuf; diff --git a/sys/fs/procfs/procfs_vfsops.c b/sys/fs/procfs/procfs_vfsops.c index 0969ffc..b9250ac 100644 --- a/sys/fs/procfs/procfs_vfsops.c +++ b/sys/fs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: procfs_vfsops.c,v 1.4 1994/08/18 22:35:14 wollman Exp $ + * $Id: procfs_vfsops.c,v 1.5 1994/09/21 03:47:06 wollman Exp $ */ /* @@ -114,7 +114,8 @@ procfs_unmount(mp, mntflags, p) flags |= FORCECLOSE; } - if (error = vflush(mp, 0, flags)) + error = vflush(mp, 0, flags); + if (error) return (error); return (0); diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 1a74859..6edfe8f 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94 * - * $Id: procfs_vnops.c,v 1.5 1994/09/21 03:47:07 wollman Exp $ + * $Id: procfs_vnops.c,v 1.6 1994/09/24 17:01:05 davidg Exp $ */ /* @@ -114,8 +114,8 @@ procfs_open(ap) if (PFIND(pfs->pfs_pid) == 0) return (ENOENT); /* was ESRCH, jsp */ - if ((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL) || - (pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)) + if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) || + ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE))) return (EBUSY); @@ -149,6 +149,8 @@ procfs_close(ap) if ((ap->a_fflag & FWRITE) && (pfs->pfs_flags & O_EXCL)) pfs->pfs_flags &= ~(FWRITE|O_EXCL); break; + default: + break; } return (0); @@ -281,8 +283,8 @@ procfs_print(ap) { struct pfsnode *pfs = VTOPFS(ap->a_vp); - printf("tag VT_PROCFS, pid %d, mode %x, flags %x\n", - pfs->pfs_pid, + printf("tag VT_PROCFS, pid %lu, mode %x, flags %x\n", + (u_long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags); return (0); } @@ -370,6 +372,8 @@ procfs_getattr(ap) ((VREAD|VWRITE)>>3)| ((VREAD|VWRITE)>>6)); break; + default: + break; } /* @@ -488,7 +492,8 @@ procfs_access(ap) if (ap->a_cred->cr_uid == (uid_t) 0) return (0); vap = &vattr; - if (error = VOP_GETATTR(ap->a_vp, vap, ap->a_cred, ap->a_p)) + error = VOP_GETATTR(ap->a_vp, vap, ap->a_cred, ap->a_p); + if (error) return (error); /* |