Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs - Use ANSI function decls.
details: https://anonhg.NetBSD.org/src/rev/0363e40b7c81
branches: trunk
changeset: 582862:0363e40b7c81
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jul 10 00:18:52 2005 +0000
description:
- Use ANSI function decls.
- Sprinkle some static.
diffstat:
sys/ufs/ufs/quota.h | 48 +++++-----
sys/ufs/ufs/ufs_bmap.c | 31 +-----
sys/ufs/ufs/ufs_bswap.h | 30 ++----
sys/ufs/ufs/ufs_extern.h | 189 +++++++++++++++++++++++-----------------------
sys/ufs/ufs/ufs_ihash.c | 29 ++----
sys/ufs/ufs/ufs_inode.c | 18 +--
sys/ufs/ufs/ufs_lookup.c | 54 +++---------
sys/ufs/ufs/ufs_quota.c | 102 ++++++------------------
sys/ufs/ufs/ufs_vfsops.c | 40 ++------
9 files changed, 205 insertions(+), 336 deletions(-)
diffs (truncated from 1097 to 300 lines):
diff -r eeb2b2cc782e -r 0363e40b7c81 sys/ufs/ufs/quota.h
--- a/sys/ufs/ufs/quota.h Sat Jul 09 22:40:34 2005 +0000
+++ b/sys/ufs/ufs/quota.h Sun Jul 10 00:18:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: quota.h,v 1.18 2004/04/27 17:37:31 jrf Exp $ */
+/* $NetBSD: quota.h,v 1.19 2005/07/10 00:18:52 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -178,37 +178,37 @@
struct ufsmount;
struct vnode;
__BEGIN_DECLS
-int chkdq __P((struct inode *, int64_t, struct ucred *, int));
-int chkdqchg __P((struct inode *, int64_t, struct ucred *, int));
-int chkiq __P((struct inode *, int32_t, struct ucred *, int));
-int chkiqchg __P((struct inode *, int32_t, struct ucred *, int));
-void dqflush __P((struct vnode *));
-int dqget __P((struct vnode *,
- u_long, struct ufsmount *, int, struct dquot **));
-void dqinit __P((void));
-void dqreinit __P((void));
-void dqdone __P((void));
-void dqref __P((struct dquot *));
-void dqrele __P((struct vnode *, struct dquot *));
-int dqsync __P((struct vnode *, struct dquot *));
-int getinoquota __P((struct inode *));
-int getquota __P((struct mount *, u_long, int, caddr_t));
-int qsync __P((struct mount *mp));
-int quotaoff __P((struct proc *, struct mount *, int));
-int quotaon __P((struct proc *, struct mount *, int, caddr_t));
-int setquota __P((struct mount *, u_long, int, caddr_t));
-int setuse __P((struct mount *, u_long, int, caddr_t));
-int ufs_quotactl __P((struct mount *, int, uid_t, void *, struct proc *));
+int chkdq(struct inode *, int64_t, struct ucred *, int);
+int chkdqchg(struct inode *, int64_t, struct ucred *, int);
+int chkiq(struct inode *, int32_t, struct ucred *, int);
+int chkiqchg(struct inode *, int32_t, struct ucred *, int);
+void dqflush(struct vnode *);
+int dqget(struct vnode *,
+ u_long, struct ufsmount *, int, struct dquot **);
+void dqinit(void);
+void dqreinit(void);
+void dqdone(void);
+void dqref(struct dquot *);
+void dqrele(struct vnode *, struct dquot *);
+int dqsync(struct vnode *, struct dquot *);
+int getinoquota(struct inode *);
+int getquota(struct mount *, u_long, int, caddr_t);
+int qsync(struct mount *mp);
+int quotaoff(struct proc *, struct mount *, int);
+int quotaon(struct proc *, struct mount *, int, caddr_t);
+int setquota(struct mount *, u_long, int, caddr_t);
+int setuse(struct mount *, u_long, int, caddr_t);
+int ufs_quotactl(struct mount *, int, uid_t, void *, struct proc *);
__END_DECLS
#ifdef DIAGNOSTIC
__BEGIN_DECLS
-void chkdquot __P((struct inode *));
+void chkdquot(struct inode *);
__END_DECLS
#endif
#else
__BEGIN_DECLS
-int quotactl __P((const char *, int , int, void *));
+int quotactl(const char *, int , int, void *);
__END_DECLS
#endif /* _KERNEL */
diff -r eeb2b2cc782e -r 0363e40b7c81 sys/ufs/ufs/ufs_bmap.c
--- a/sys/ufs/ufs/ufs_bmap.c Sat Jul 09 22:40:34 2005 +0000
+++ b/sys/ufs/ufs/ufs_bmap.c Sun Jul 10 00:18:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_bmap.c,v 1.35 2005/02/26 22:32:20 perry Exp $ */
+/* $NetBSD: ufs_bmap.c,v 1.36 2005/07/10 00:18:52 thorpej Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.35 2005/02/26 22:32:20 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.36 2005/07/10 00:18:52 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,14 +55,8 @@
#include <ufs/ufs/ufs_extern.h>
#include <ufs/ufs/ufs_bswap.h>
-static boolean_t ufs_issequential __P((const struct ufsmount *,
- daddr_t, daddr_t));
-
static boolean_t
-ufs_issequential(ump, daddr0, daddr1)
- const struct ufsmount *ump;
- daddr_t daddr0;
- daddr_t daddr1;
+ufs_issequential(const struct ufsmount *ump, daddr_t daddr0, daddr_t daddr1)
{
/* for ufs, blocks in a hole is not 'contiguous'. */
@@ -78,8 +72,7 @@
* number to index into the array of block pointers described by the dinode.
*/
int
-ufs_bmap(v)
- void *v;
+ufs_bmap(void *v)
{
struct vop_bmap_args /* {
struct vnode *a_vp;
@@ -116,14 +109,8 @@
*/
int
-ufs_bmaparray(vp, bn, bnp, ap, nump, runp, is_sequential)
- struct vnode *vp;
- daddr_t bn;
- daddr_t *bnp;
- struct indir *ap;
- int *nump;
- int *runp;
- ufs_issequential_callback_t is_sequential;
+ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, struct indir *ap,
+ int *nump, int *runp, ufs_issequential_callback_t is_sequential)
{
struct inode *ip;
struct buf *bp;
@@ -330,11 +317,7 @@
* once with the offset into the page itself.
*/
int
-ufs_getlbns(vp, bn, ap, nump)
- struct vnode *vp;
- daddr_t bn;
- struct indir *ap;
- int *nump;
+ufs_getlbns(struct vnode *vp, daddr_t bn, struct indir *ap, int *nump)
{
daddr_t metalbn, realbn;
struct ufsmount *ump;
diff -r eeb2b2cc782e -r 0363e40b7c81 sys/ufs/ufs/ufs_bswap.h
--- a/sys/ufs/ufs/ufs_bswap.h Sat Jul 09 22:40:34 2005 +0000
+++ b/sys/ufs/ufs/ufs_bswap.h Sun Jul 10 00:18:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_bswap.h,v 1.14 2004/08/15 07:19:58 mycroft Exp $ */
+/* $NetBSD: ufs_bswap.h,v 1.15 2005/07/10 00:18:52 thorpej Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@@ -52,30 +52,22 @@
#if !defined(_KERNEL) || defined(FFS_EI)
/* inlines for access to swapped data */
-static __inline u_int16_t ufs_rw16 __P((u_int16_t, int));
-static __inline u_int32_t ufs_rw32 __P((u_int32_t, int));
-static __inline u_int64_t ufs_rw64 __P((u_int64_t, int));
+static __inline u_int16_t
+ufs_rw16(uint16_t a, int ns)
+{
+ return ((ns) ? bswap16(a) : (a));
+}
-static __inline u_int16_t
-ufs_rw16(a, ns)
- u_int16_t a;
- int ns;
-{
- return ((ns) ? bswap16(a) : (a));
-}
static __inline u_int32_t
-ufs_rw32(a, ns)
- u_int32_t a;
- int ns;
+ufs_rw32(uint32_t a, int ns)
{
- return ((ns) ? bswap32(a) : (a));
+ return ((ns) ? bswap32(a) : (a));
}
+
static __inline u_int64_t
-ufs_rw64(a, ns)
- u_int64_t a;
- int ns;
+ufs_rw64(uint64_t a, int ns)
{
- return ((ns) ? bswap64(a) : (a));
+ return ((ns) ? bswap64(a) : (a));
}
#else
#define ufs_rw16(a, ns) ((uint16_t)(a))
diff -r eeb2b2cc782e -r 0363e40b7c81 sys/ufs/ufs/ufs_extern.h
--- a/sys/ufs/ufs/ufs_extern.h Sat Jul 09 22:40:34 2005 +0000
+++ b/sys/ufs/ufs/ufs_extern.h Sun Jul 10 00:18:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_extern.h,v 1.43 2005/05/29 21:25:24 christos Exp $ */
+/* $NetBSD: ufs_extern.h,v 1.44 2005/07/10 00:18:52 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -58,116 +58,114 @@
__BEGIN_DECLS
#define ufs_abortop genfs_abortop
-int ufs_access __P((void *));
-int ufs_advlock __P((void *));
-int ufs_bmap __P((void *));
-int ufs_close __P((void *));
-int ufs_create __P((void *));
-int ufs_getattr __P((void *));
-int ufs_inactive __P((void *));
+int ufs_access(void *);
+int ufs_advlock(void *);
+int ufs_bmap(void *);
+int ufs_close(void *);
+int ufs_create(void *);
+int ufs_getattr(void *);
+int ufs_inactive(void *);
#define ufs_fcntl genfs_fcntl
#define ufs_ioctl genfs_enoioctl
#define ufs_islocked genfs_islocked
#define ufs_lease_check genfs_lease_check
-int ufs_link __P((void *));
+int ufs_link(void *);
#define ufs_lock genfs_lock
-int ufs_lookup __P((void *));
-int ufs_mkdir __P((void *));
-int ufs_mknod __P((void *));
+int ufs_lookup(void *);
+int ufs_mkdir(void *);
+int ufs_mknod(void *);
#define ufs_mmap genfs_mmap
#define ufs_revoke genfs_revoke
-int ufs_open __P((void *));
-int ufs_pathconf __P((void *));
-int ufs_print __P((void *));
-int ufs_readdir __P((void *));
-int ufs_readlink __P((void *));
-int ufs_remove __P((void *));
-int ufs_rename __P((void *));
-int ufs_rmdir __P((void *));
+int ufs_open(void *);
+int ufs_pathconf(void *);
+int ufs_print(void *);
+int ufs_readdir(void *);
+int ufs_readlink(void *);
+int ufs_remove(void *);
+int ufs_rename(void *);
+int ufs_rmdir(void *);
#define ufs_seek genfs_seek
#define ufs_poll genfs_poll
-int ufs_setattr __P((void *));
-int ufs_strategy __P((void *));
-int ufs_symlink __P((void *));
+int ufs_setattr(void *);
+int ufs_strategy(void *);
+int ufs_symlink(void *);
#define ufs_unlock genfs_unlock
-int ufs_whiteout __P((void *));
-int ufsspec_close __P((void *));
-int ufsspec_read __P((void *));
-int ufsspec_write __P((void *));
+int ufs_whiteout(void *);
+int ufsspec_close(void *);
+int ufsspec_read(void *);
+int ufsspec_write(void *);
-int ufsfifo_read __P((void *));
-int ufsfifo_write __P((void *));
-int ufsfifo_close __P((void *));
+int ufsfifo_read(void *);
+int ufsfifo_write(void *);
+int ufsfifo_close(void *);
/* ufs_bmap.c */
-typedef boolean_t (*ufs_issequential_callback_t) __P((const struct ufsmount *,
- daddr_t, daddr_t));
-int ufs_bmaparray __P((struct vnode *, daddr_t, daddr_t *, struct indir *,
- int *, int *, ufs_issequential_callback_t));
-int ufs_getlbns __P((struct vnode *, daddr_t, struct indir *, int *));
+typedef boolean_t (*ufs_issequential_callback_t)(const struct ufsmount *,
+ daddr_t, daddr_t);
+int ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *,
+ int *, int *, ufs_issequential_callback_t);
+int ufs_getlbns(struct vnode *, daddr_t, struct indir *, int *);
/* ufs_ihash.c */
-void ufs_ihashinit __P((void));
-void ufs_ihashreinit __P((void));
-void ufs_ihashdone __P((void));
-struct vnode *ufs_ihashlookup __P((dev_t, ino_t));
-struct vnode *ufs_ihashget __P((dev_t, ino_t, int));
-void ufs_ihashins __P((struct inode *));
-void ufs_ihashrem __P((struct inode *));
+void ufs_ihashinit(void);
+void ufs_ihashreinit(void);
+void ufs_ihashdone(void);
Home |
Main Index |
Thread Index |
Old Index