summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-07-13 21:04:30 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-07-13 21:04:30 +0000
commit808ea3c6ef13210b97a953d1af60f18af8fedade (patch)
tree76e658442d20a298bbbec645963b0ef98fe8a653 /sys/ufs/ffs
parent79acdfbd39f0127e25ba7aad63839b6455171e08 (diff)
Change mode_t and nlink_t from 16bit to 32bit. This allows us to
use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c11
-rw-r--r--sys/ufs/ffs/ffs_extern.h10
-rw-r--r--sys/ufs/ffs/ffs_softdep.c4
-rw-r--r--sys/ufs/ffs/ffs_softdep_stub.c4
4 files changed, 14 insertions, 15 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 5cd77b732ac..ddcef60febc 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_alloc.c,v 1.48 2004/07/02 13:03:36 mickey Exp $ */
+/* $OpenBSD: ffs_alloc.c,v 1.49 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */
/*
@@ -128,8 +128,7 @@ ffs_alloc(ip, lbn, bpref, size, cred, bnp)
cg = ino_to_cg(fs, ip->i_number);
else
cg = dtog(fs, bpref);
- bno = (daddr_t)ffs_hashalloc(ip, cg, (long)bpref, size,
- ffs_alloccg);
+ bno = (daddr_t)ffs_hashalloc(ip, cg, (long)bpref, size, ffs_alloccg);
if (bno > 0) {
ip->i_ffs_blocks += btodb(size);
ip->i_flag |= IN_CHANGE | IN_UPDATE;
@@ -566,7 +565,7 @@ fail:
* available inode is located.
*/
int
-ffs_inode_alloc(struct inode *pip, int mode, struct ucred *cred,
+ffs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *cred,
struct vnode **vpp)
{
struct vnode *pvp = ITOV(pip);
@@ -1498,7 +1497,7 @@ ffs_blkfree(ip, bno, size)
}
int
-ffs_inode_free(struct inode *pip, ino_t ino, int mode)
+ffs_inode_free(struct inode *pip, ino_t ino, mode_t mode)
{
struct vnode *pvp = ITOV(pip);
@@ -1515,7 +1514,7 @@ ffs_inode_free(struct inode *pip, ino_t ino, int mode)
* The specified inode is placed back in the free map.
*/
int
-ffs_freefile(struct inode *pip, ino_t ino, int mode)
+ffs_freefile(struct inode *pip, ino_t ino, mode_t mode)
{
struct fs *fs;
struct cg *cgp;
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index b31d6c91c9b..f35c3cd11b3 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_extern.h,v 1.23 2004/03/02 05:46:01 tedu Exp $ */
+/* $OpenBSD: ffs_extern.h,v 1.24 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */
/*-
@@ -103,9 +103,9 @@ int ffs_alloc(struct inode *, daddr_t, daddr_t , int, struct ucred *,
int ffs_realloccg(struct inode *, daddr_t, daddr_t, int, int ,
struct ucred *, struct buf **, daddr_t *);
int ffs_reallocblks(void *);
-int ffs_inode_alloc(struct inode *, int, struct ucred *, struct vnode **);
-int ffs_inode_free(struct inode *, ino_t, int);
-int ffs_freefile(struct inode *, ino_t, int);
+int ffs_inode_alloc(struct inode *, mode_t, struct ucred *, struct vnode **);
+int ffs_inode_free(struct inode *, ino_t, mode_t);
+int ffs_freefile(struct inode *, ino_t, mode_t);
daddr_t ffs_blkpref(struct inode *, daddr_t, int, daddr_t *);
void ffs_blkfree(struct inode *, daddr_t, long);
@@ -172,7 +172,7 @@ int softdep_flushworklist(struct mount *, int *, struct proc *);
int softdep_flushfiles(struct mount *, int, struct proc *);
void softdep_update_inodeblock(struct inode *, struct buf *, int);
void softdep_load_inodeblock(struct inode *);
-void softdep_freefile(struct vnode *, ino_t, int);
+void softdep_freefile(struct vnode *, ino_t, mode_t);
void softdep_setup_freeblocks(struct inode *, off_t);
void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t);
void softdep_setup_blkmapdep(struct buf *, struct fs *, daddr_t);
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 9c82db74e9c..37f589f023d 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.51 2004/06/24 19:35:26 tholo Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.52 2004/07/13 21:04:29 millert Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
*
@@ -2211,7 +2211,7 @@ void
softdep_freefile(pvp, ino, mode)
struct vnode *pvp;
ino_t ino;
- int mode;
+ mode_t mode;
{
struct inode *ip = VTOI(pvp);
struct inodedep *inodedep;
diff --git a/sys/ufs/ffs/ffs_softdep_stub.c b/sys/ufs/ffs/ffs_softdep_stub.c
index 1c199fd9439..cc86c310f42 100644
--- a/sys/ufs/ffs/ffs_softdep_stub.c
+++ b/sys/ufs/ffs/ffs_softdep_stub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep_stub.c,v 1.6 2004/05/07 01:40:16 tedu Exp $ */
+/* $OpenBSD: ffs_softdep_stub.c,v 1.7 2004/07/13 21:04:29 millert Exp $ */
/*
* Copyright 1998 Marshall Kirk McKusick. All Rights Reserved.
@@ -148,7 +148,7 @@ void
softdep_freefile(pvp, ino, mode)
struct vnode *pvp;
ino_t ino;
- int mode;
+ mode_t mode;
{
panic("softdep_freefile called");