summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/bsdos/syscalls.master11
-rw-r--r--sys/compat/common/Makefile5
-rw-r--r--sys/compat/common/vfs_syscalls_35.c167
-rw-r--r--sys/compat/common/vfs_syscalls_43.c8
-rw-r--r--sys/compat/freebsd/freebsd_file.c10
-rw-r--r--sys/compat/freebsd/syscalls.master10
-rw-r--r--sys/compat/netbsd/netbsd_stat.h22
-rw-r--r--sys/compat/netbsd/syscalls.master8
-rw-r--r--sys/kern/syscalls.master30
-rw-r--r--sys/kern/vfs_syscalls.c22
-rw-r--r--sys/kern/vfs_vnops.c4
-rw-r--r--sys/nfs/nfs_subs.c12
-rw-r--r--sys/sys/stat.h35
-rw-r--r--sys/sys/types.h6
-rw-r--r--sys/sys/vnode.h6
-rw-r--r--sys/ufs/ext2fs/ext2fs_alloc.c6
-rw-r--r--sys/ufs/ext2fs/ext2fs_extern.h6
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c9
-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
-rw-r--r--sys/ufs/ufs/inode.h6
-rw-r--r--sys/ufs/ufs/ufs_inode.c5
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c4
25 files changed, 304 insertions, 117 deletions
diff --git a/sys/compat/bsdos/syscalls.master b/sys/compat/bsdos/syscalls.master
index 23c1519292c..db626b903f3 100644
--- a/sys/compat/bsdos/syscalls.master
+++ b/sys/compat/bsdos/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.14 2004/07/09 23:52:02 millert Exp $
+ $OpenBSD: syscalls.master,v 1.15 2004/07/13 21:04:28 millert Exp $
; OpenBSD COMPAT_BSDOS system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
@@ -337,9 +337,12 @@
186 UNIMPL
187 UNIMPL
#endif
-188 NOARGS { int sys_stat(char *path, struct stat *ub); }
-189 NOARGS { int sys_fstat(int fd, struct stat *sb); }
-190 NOARGS { int sys_lstat(char *path, struct stat *ub); }
+188 NOARGS { int compat_35_sys_stat(char *path, \
+ struct stat35 *ub); } stat35
+189 NOARGS { int compat_35_sys_fstat(int fd, \
+ struct stat35 *sb); } fstat35
+190 NOARGS { int compat_35_sys_lstat(char *path, \
+ struct stat35 *ub); } lstat35
191 NOARGS { int sys_pathconf(char *path, int name); }
192 NOARGS { int sys_fpathconf(int fd, int name); }
193 UNIMPL
diff --git a/sys/compat/common/Makefile b/sys/compat/common/Makefile
index 90c4e67399f..47cad8c0825 100644
--- a/sys/compat/common/Makefile
+++ b/sys/compat/common/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.17 2004/05/03 17:38:48 millert Exp $
+# $OpenBSD: Makefile,v 1.18 2004/07/13 21:04:29 millert Exp $
# $NetBSD: Makefile,v 1.8 1996/05/18 15:52:19 christos Exp $
LIB= compat
@@ -12,7 +12,8 @@ MACHINE_ARCH= ${XMACHINE_ARCH}
SRCS= compat_exec.c compat_util.c compat_dir.c compat_vm.c \
kern_exit_43.c kern_ipc_23.c kern_ipc_35.c kern_info_09.c \
kern_info_43.c kern_resource_43.c kern_sig_43.c tty_43.c \
- uipc_syscalls_43.c vfs_syscalls_25.c vfs_syscalls_43.c vm_43.c
+ uipc_syscalls_43.c vfs_syscalls_25.c vfs_syscalls_35.c \
+ vfs_syscalls_43.c vm_43.c
# really, all machines where sizeof(int) != sizeof(long)
.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "amd64") && \
diff --git a/sys/compat/common/vfs_syscalls_35.c b/sys/compat/common/vfs_syscalls_35.c
new file mode 100644
index 00000000000..e9e6c62cbf1
--- /dev/null
+++ b/sys/compat/common/vfs_syscalls_35.c
@@ -0,0 +1,167 @@
+/* $OpenBSD: vfs_syscalls_35.c,v 1.1 2004/07/13 21:04:29 millert Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)vfs_syscalls.c 8.28 (Berkeley) 12/10/94
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/filedesc.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/file.h>
+#include <sys/vnode.h>
+#include <sys/namei.h>
+#include <sys/dirent.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/stat.h>
+
+#include <sys/mount.h>
+#include <sys/syscallargs.h>
+
+static void cvtstat(struct stat *, struct stat35 *);
+
+/*
+ * Convert from a new to an old stat structure.
+ */
+static void
+cvtstat(struct stat *st, struct stat35 *ost)
+{
+
+ ost->st_dev = st->st_dev;
+ ost->st_ino = st->st_ino;
+ ost->st_mode = st->st_mode & 0xffff;
+ ost->st_nlink = st->st_nlink & 0xffff;
+ ost->st_uid = st->st_uid;
+ ost->st_gid = st->st_gid;
+ ost->st_rdev = st->st_rdev;
+ ost->st_atimespec = st->st_atimespec;
+ ost->st_mtimespec = st->st_mtimespec;
+ ost->st_ctimespec = st->st_ctimespec;
+ ost->st_size = st->st_size;
+ ost->st_blocks = st->st_blocks;
+ ost->st_blksize = st->st_blksize;
+ ost->st_flags = st->st_flags;
+ ost->st_gen = st->st_gen;
+}
+
+/*
+ * Get file status; this version follows links.
+ */
+/* ARGSUSED */
+int
+compat_35_sys_stat(struct proc *p, void *v, register_t *retval)
+{
+ struct compat_35_sys_stat_args /* {
+ syscallarg(char *) path;
+ syscallarg(struct stat35 *) ub;
+ } */ *uap = v;
+ struct stat sb;
+ struct stat35 osb;
+ int error;
+ struct nameidata nd;
+
+ NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
+ SCARG(uap, path), p);
+ if ((error = namei(&nd)) != 0)
+ return (error);
+ error = vn_stat(nd.ni_vp, &sb, p);
+ vput(nd.ni_vp);
+ if (error)
+ return (error);
+ cvtstat(&sb, &osb);
+ error = copyout((caddr_t)&osb, (caddr_t)SCARG(uap, ub), sizeof (osb));
+ return (error);
+}
+
+/*
+ * Get file status; this version does not follow links.
+ */
+/* ARGSUSED */
+int
+compat_35_sys_lstat(struct proc *p, void *v, register_t *retval)
+{
+ struct compat_35_sys_lstat_args /* {
+ syscallarg(char *) path;
+ syscallarg(struct stat35 *) ub;
+ } */ *uap = v;
+ struct stat sb;
+ struct stat35 osb;
+ int error;
+ struct nameidata nd;
+
+ NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF, UIO_USERSPACE,
+ SCARG(uap, path), p);
+ if ((error = namei(&nd)) != 0)
+ return (error);
+ error = vn_stat(nd.ni_vp, &sb, p);
+ vput(nd.ni_vp);
+ if (error)
+ return (error);
+ cvtstat(&sb, &osb);
+ error = copyout(&osb, SCARG(uap, ub), sizeof (osb));
+ return (error);
+}
+
+/*
+ * Return status information about a file descriptor.
+ */
+/* ARGSUSED */
+int
+compat_35_sys_fstat(struct proc *p, void *v, register_t *retval)
+{
+ struct compat_35_sys_fstat_args /* {
+ syscallarg(int) fd;
+ syscallarg(struct stat35 *) sb;
+ } */ *uap = v;
+ int fd = SCARG(uap, fd);
+ struct filedesc *fdp = p->p_fd;
+ struct file *fp;
+ struct stat ub;
+ struct stat35 oub;
+ int error;
+
+ if ((fp = fd_getfile(fdp, fd)) == NULL)
+ return (EBADF);
+ FREF(fp);
+ error = (*fp->f_ops->fo_stat)(fp, &ub, p);
+ FRELE(fp);
+ cvtstat(&ub, &oub);
+ if (error == 0)
+ error = copyout((caddr_t)&oub, (caddr_t)SCARG(uap, sb),
+ sizeof (oub));
+ return (error);
+}
diff --git a/sys/compat/common/vfs_syscalls_43.c b/sys/compat/common/vfs_syscalls_43.c
index 0b4d33250f1..025dfd1739b 100644
--- a/sys/compat/common/vfs_syscalls_43.c
+++ b/sys/compat/common/vfs_syscalls_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls_43.c,v 1.23 2004/07/09 23:52:02 millert Exp $ */
+/* $OpenBSD: vfs_syscalls_43.c,v 1.24 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/03/14 19:31:52 christos Exp $ */
/*
@@ -77,7 +77,7 @@ extern int (*union_check_p)(struct proc *, struct vnode **,
struct file *, struct uio, int *);
/*
- * Convert from an old to a new stat structure.
+ * Convert from a new to an old stat structure.
*/
static void
cvtstat(st, ost)
@@ -299,12 +299,12 @@ compat_43_sys_creat(p, v, retval)
{
register struct compat_43_sys_creat_args /* {
syscallarg(char *) path;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
struct sys_open_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ nuap;
SCARG(&nuap, path) = SCARG(uap, path);
diff --git a/sys/compat/freebsd/freebsd_file.c b/sys/compat/freebsd/freebsd_file.c
index 56baf4b0b11..ddd063a2935 100644
--- a/sys/compat/freebsd/freebsd_file.c
+++ b/sys/compat/freebsd/freebsd_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: freebsd_file.c,v 1.18 2004/07/09 23:52:02 millert Exp $ */
+/* $OpenBSD: freebsd_file.c,v 1.19 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */
/*
@@ -726,12 +726,12 @@ freebsd_sys_stat(p, v, retval)
{
struct freebsd_sys_stat_args /* {
syscallarg(char *) path;
- syscallarg(struct stat *) ub;
+ syscallarg(struct stat35 *) ub;
} */ *uap = v;
caddr_t sg = stackgap_init(p->p_emul);
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_stat(p, uap, retval);
+ return compat_35_sys_stat(p, uap, retval);
}
int
@@ -742,12 +742,12 @@ freebsd_sys_lstat(p, v, retval)
{
struct freebsd_sys_lstat_args /* {
syscallarg(char *) path;
- syscallarg(struct stat *) ub;
+ syscallarg(struct stat35 *) ub;
} */ *uap = v;
caddr_t sg = stackgap_init(p->p_emul);
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_lstat(p, uap, retval);
+ return compat_35_sys_lstat(p, uap, retval);
}
int
diff --git a/sys/compat/freebsd/syscalls.master b/sys/compat/freebsd/syscalls.master
index 326483d1974..da40093160d 100644
--- a/sys/compat/freebsd/syscalls.master
+++ b/sys/compat/freebsd/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.25 2004/07/09 23:52:02 millert Exp $
+ $OpenBSD: syscalls.master,v 1.26 2004/07/13 21:04:29 millert Exp $
; $NetBSD: syscalls.master,v 1.3 1995/10/10 18:28:40 mycroft Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -364,9 +364,11 @@
186 UNIMPL
187 UNIMPL
#endif
-188 STD { int freebsd_sys_stat(char *path, struct stat *ub); }
-189 NOARGS { int sys_fstat(int fd, struct stat *sb); }
-190 STD { int freebsd_sys_lstat(char *path, struct stat *ub); }
+188 STD { int freebsd_sys_stat(char *path, struct stat35 *ub); }
+189 NOARGS { int compat_35_sys_fstat(int fd, \
+ struct stat35 *sb); }
+190 STD { int freebsd_sys_lstat(char *path, \
+ struct stat35 *ub); }
191 STD { int freebsd_sys_pathconf(char *path, int name); }
192 NOARGS { int sys_fpathconf(int fd, int name); }
193 UNIMPL
diff --git a/sys/compat/netbsd/netbsd_stat.h b/sys/compat/netbsd/netbsd_stat.h
index 582fd451c37..85b8710a786 100644
--- a/sys/compat/netbsd/netbsd_stat.h
+++ b/sys/compat/netbsd/netbsd_stat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_stat.h,v 1.4 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: netbsd_stat.h,v 1.5 2004/07/13 21:04:29 millert Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -36,26 +36,6 @@
* @(#)stat.h 8.12 (Berkeley) 8/17/94
*/
-struct netbsd_stat12 { /* NetBSD-1.2 stat struct */
- dev_t st_dev; /* inode's device */
- ino_t st_ino; /* inode's number */
- u_int16_t st_mode; /* inode protection mode */
- u_int16_t st_nlink; /* number of hard links */
- uid_t st_uid; /* user ID of the file's owner */
- gid_t st_gid; /* group ID of the file's group */
- dev_t st_rdev; /* device type */
- struct timespec st_atimespec;/* time of last access */
- struct timespec st_mtimespec;/* time of last data modification */
- struct timespec st_ctimespec;/* time of last file status change */
- off_t st_size; /* file size, in bytes */
- int64_t st_blocks; /* blocks allocated for file */
- u_int32_t st_blksize; /* optimal blocksize for I/O */
- u_int32_t st_flags; /* user defined flags for file */
- u_int32_t st_gen; /* file generation number */
- int32_t st_lspare;
- int64_t st_qspare[2];
-};
-
/*
* On systems with 8 byte longs and 4 byte time_ts, padding the time_ts
* is required in order to have a consistent ABI. This is because the
diff --git a/sys/compat/netbsd/syscalls.master b/sys/compat/netbsd/syscalls.master
index d0138644513..78d7a886e14 100644
--- a/sys/compat/netbsd/syscalls.master
+++ b/sys/compat/netbsd/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.23 2004/07/09 23:52:02 millert Exp $
+; $OpenBSD: syscalls.master,v 1.24 2004/07/13 21:04:29 millert Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -396,9 +396,9 @@
186 UNIMPL
187 UNIMPL
#endif
-188 STD { int netbsd_sys_stat(char *path, struct stat *ub); }
-189 NOARGS { int sys_fstat(int fd, struct stat12 *sb); }
-190 STD { int netbsd_sys_lstat(char *path, struct stat *ub); }
+188 STD { int netbsd_sys_stat(char *path, struct stat35 *ub); }
+189 NOARGS { int sys_fstat(int fd, struct stat35 *sb); }
+190 STD { int netbsd_sys_lstat(char *path, struct stat35 *ub); }
191 STD { long netbsd_sys_pathconf(char *path, int name); }
192 NOARGS { long sys_fpathconf(int fd, int name); }
193 NOARGS { int sys_swapctl(int cmd, const void *arg, int misc); }
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 84e08e0995f..2992da4437f 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.71 2004/07/09 23:52:02 millert Exp $
+; $OpenBSD: syscalls.master,v 1.72 2004/07/13 21:04:29 millert Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -56,19 +56,19 @@
4 STD { ssize_t sys_write(int fd, const void *buf, \
size_t nbyte); }
5 STD { int sys_open(const char *path, \
- int flags, ... int mode); }
+ int flags, ... mode_t mode); }
6 STD { int sys_close(int fd); }
7 STD { pid_t sys_wait4(pid_t pid, int *status, int options, \
struct rusage *rusage); }
-8 COMPAT_43 { int sys_creat(const char *path, int mode); } ocreat
+8 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat
9 STD { int sys_link(const char *path, const char *link); }
10 STD { int sys_unlink(const char *path); }
11 OBSOL execv
12 STD { int sys_chdir(const char *path); }
13 STD { int sys_fchdir(int fd); }
-14 STD { int sys_mknod(const char *path, int mode, \
+14 STD { int sys_mknod(const char *path, mode_t mode, \
dev_t dev); }
-15 STD { int sys_chmod(const char *path, int mode); }
+15 STD { int sys_chmod(const char *path, mode_t mode); }
16 STD { int sys_chown(const char *path, uid_t uid, \
gid_t gid); }
17 STD { int sys_obreak(char *nsize); } break
@@ -148,7 +148,7 @@
size_t count); }
59 STD { int sys_execve(const char *path, \
char * const *argp, char * const *envp); }
-60 STD { int sys_umask(int newmask); }
+60 STD { mode_t sys_umask(mode_t newmask); }
61 STD { int sys_chroot(const char *path); }
62 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43
63 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \
@@ -240,7 +240,7 @@
122 STD { int sys_settimeofday(const struct timeval *tv, \
const struct timezone *tzp); }
123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); }
-124 STD { int sys_fchmod(int fd, int mode); }
+124 STD { int sys_fchmod(int fd, mode_t mode); }
125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); } \
orecvfrom
@@ -251,14 +251,14 @@
otruncate
130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate
131 STD { int sys_flock(int fd, int how); }
-132 STD { int sys_mkfifo(const char *path, int mode); }
+132 STD { int sys_mkfifo(const char *path, mode_t mode); }
133 STD { ssize_t sys_sendto(int s, const void *buf, \
size_t len, int flags, const struct sockaddr *to, \
socklen_t tolen); }
134 STD { int sys_shutdown(int s, int how); }
135 STD { int sys_socketpair(int domain, int type, \
int protocol, int *rsv); }
-136 STD { int sys_mkdir(const char *path, int mode); }
+136 STD { int sys_mkdir(const char *path, mode_t mode); }
137 STD { int sys_rmdir(const char *path); }
138 STD { int sys_utimes(const char *path, \
const struct timeval *tptr); }
@@ -359,9 +359,12 @@
186 UNIMPL
187 UNIMPL
#endif
-188 STD { int sys_stat(const char *path, struct stat *ub); }
-189 STD { int sys_fstat(int fd, struct stat *sb); }
-190 STD { int sys_lstat(const char *path, struct stat *ub); }
+188 COMPAT_35 { int sys_stat(const char *path, struct stat35 *ub); } \
+ stat35
+189 COMPAT_35 { int sys_fstat(int fd, struct stat35 *sb); } \
+ fstat35
+190 COMPAT_35 { int sys_lstat(const char *path, \
+ struct stat35 *ub); } lstat35
191 STD { long sys_pathconf(const char *path, int name); }
192 STD { long sys_fpathconf(int fd, int name); }
193 STD { int sys_swapctl(int cmd, const void *arg, int misc); }
@@ -590,3 +593,6 @@
#else
290 UNIMPL semop
#endif
+291 STD { int sys_stat(const char *path, struct stat *ub); }
+292 STD { int sys_fstat(int fd, struct stat *sb); }
+293 STD { int sys_lstat(const char *path, struct stat *ub); }
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 57bab21adf7..a29667e6d35 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.113 2004/07/03 18:14:02 pedro Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.114 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -888,7 +888,7 @@ sys_open(p, v, retval)
struct sys_open_args /* {
syscallarg(const char *) path;
syscallarg(int) flags;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
struct filedesc *fdp = p->p_fd;
struct file *fp;
@@ -1249,7 +1249,7 @@ sys_mknod(p, v, retval)
{
register struct sys_mknod_args /* {
syscallarg(const char *) path;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
syscallarg(int) dev;
} */ *uap = v;
register struct vnode *vp;
@@ -1330,7 +1330,7 @@ sys_mkfifo(p, v, retval)
#else
register struct sys_mkfifo_args /* {
syscallarg(const char *) path;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
struct vattr vattr;
int error;
@@ -1890,7 +1890,7 @@ sys_chmod(p, v, retval)
{
register struct sys_chmod_args /* {
syscallarg(const char *) path;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
register struct vnode *vp;
struct vattr vattr;
@@ -1929,7 +1929,7 @@ sys_fchmod(p, v, retval)
{
struct sys_fchmod_args /* {
syscallarg(int) fd;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
struct vattr vattr;
struct vnode *vp;
@@ -1975,7 +1975,7 @@ sys_chown(p, v, retval)
struct vattr vattr;
int error;
struct nameidata nd;
- u_short mode;
+ mode_t mode;
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
if ((error = namei(&nd)) != 0)
@@ -2027,7 +2027,7 @@ sys_lchown(p, v, retval)
struct vattr vattr;
int error;
struct nameidata nd;
- u_short mode;
+ mode_t mode;
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
if ((error = namei(&nd)) != 0)
@@ -2079,7 +2079,7 @@ sys_fchown(p, v, retval)
struct vattr vattr;
int error;
struct file *fp;
- u_short mode;
+ mode_t mode;
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
@@ -2440,7 +2440,7 @@ sys_mkdir(p, v, retval)
{
register struct sys_mkdir_args /* {
syscallarg(const char *) path;
- syscallarg(int) mode;
+ syscallarg(mode_t) mode;
} */ *uap = v;
register struct vnode *vp;
struct vattr vattr;
@@ -2612,7 +2612,7 @@ sys_umask(p, v, retval)
register_t *retval;
{
struct sys_umask_args /* {
- syscallarg(int) newmask;
+ syscallarg(mode_t) newmask;
} */ *uap = v;
register struct filedesc *fdp;
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index bcef263c4a9..4c78380c633 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.44 2003/09/23 16:51:12 millert Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.45 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -366,7 +366,7 @@ vn_stat(vp, sb, p)
{
struct vattr va;
int error;
- u_short mode;
+ mode_t mode;
error = VOP_GETATTR(vp, &va, p->p_ucred, p);
if (error)
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index a4fb7ee4a23..a6b97bfc216 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.45 2004/06/21 23:50:38 tholo Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.46 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1124,7 +1124,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
int32_t rdev;
struct mbuf *md;
enum vtype vtyp;
- u_short vmode;
+ mode_t vmode;
struct timespec mtime;
struct vnode *nvp;
int v3 = NFS_ISV3(vp);
@@ -1137,13 +1137,13 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
fp = (struct nfs_fattr *)cp2;
if (v3) {
vtyp = nfsv3tov_type(fp->fa_type);
- vmode = fxdr_unsigned(u_short, fp->fa_mode);
+ vmode = fxdr_unsigned(mode_t, fp->fa_mode);
rdev = makedev(fxdr_unsigned(u_char, fp->fa3_rdev.specdata1),
fxdr_unsigned(u_char, fp->fa3_rdev.specdata2));
fxdr_nfsv3time(&fp->fa3_mtime, &mtime);
} else {
vtyp = nfsv2tov_type(fp->fa_type);
- vmode = fxdr_unsigned(u_short, fp->fa_mode);
+ vmode = fxdr_unsigned(mode_t, fp->fa_mode);
if (vtyp == VNON || vtyp == VREG)
vtyp = IFTOVT(vmode);
rdev = fxdr_unsigned(int32_t, fp->fa2_rdev);
@@ -1207,7 +1207,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
vap->va_mtime = mtime;
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
if (v3) {
- vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
+ vap->va_nlink = fxdr_unsigned(nlink_t, fp->fa_nlink);
vap->va_uid = fxdr_unsigned(uid_t, fp->fa_uid);
vap->va_gid = fxdr_unsigned(gid_t, fp->fa_gid);
vap->va_size = fxdr_hyper(&fp->fa3_size);
@@ -1220,7 +1220,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
vap->va_flags = 0;
vap->va_filerev = 0;
} else {
- vap->va_nlink = fxdr_unsigned(u_short, fp->fa_nlink);
+ vap->va_nlink = fxdr_unsigned(nlink_t, fp->fa_nlink);
vap->va_uid = fxdr_unsigned(uid_t, fp->fa_uid);
vap->va_gid = fxdr_unsigned(gid_t, fp->fa_gid);
vap->va_size = fxdr_unsigned(u_int32_t, fp->fa2_size);
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
index f46f131a33b..37ce7d58f87 100644
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stat.h,v 1.13 2004/07/09 23:52:01 millert Exp $ */
+/* $OpenBSD: stat.h,v 1.14 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ */
/*-
@@ -46,8 +46,8 @@
struct stat43 {
u_int16_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
- mode_t st_mode; /* inode protection mode */
- nlink_t st_nlink; /* number of hard links */
+ u_int16_t st_mode; /* inode protection mode */
+ u_int16_t st_nlink; /* number of hard links */
u_int16_t st_uid; /* user ID of the file's owner */
u_int16_t st_gid; /* group ID of the file's group */
u_int16_t st_rdev; /* device type */
@@ -60,6 +60,26 @@ struct stat43 {
u_int32_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
};
+
+struct stat35 {
+ dev_t st_dev; /* inode's device */
+ ino_t st_ino; /* inode's number */
+ u_int16_t st_mode; /* inode protection mode */
+ u_int16_t st_nlink; /* number of hard links */
+ uid_t st_uid; /* user ID of the file's owner */
+ gid_t st_gid; /* group ID of the file's group */
+ dev_t st_rdev; /* device type */
+ struct timespec st_atimespec; /* time of last access */
+ struct timespec st_mtimespec; /* time of last data modification */
+ struct timespec st_ctimespec; /* time of last file status change */
+ off_t st_size; /* file size, in bytes */
+ int64_t st_blocks; /* blocks allocated for file */
+ u_int32_t st_blksize; /* optimal blocksize for I/O */
+ u_int32_t st_flags; /* user defined flags for file */
+ u_int32_t st_gen; /* file generation number */
+ int32_t st_lspare;
+ int64_t st_qspare[2];
+};
#endif /* !_KERNEL */
struct stat {
@@ -70,6 +90,7 @@ struct stat {
uid_t st_uid; /* user ID of the file's owner */
gid_t st_gid; /* group ID of the file's group */
dev_t st_rdev; /* device type */
+ int32_t st_lspare0;
#ifndef _POSIX_SOURCE
struct timespec st_atimespec; /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */
@@ -87,7 +108,13 @@ struct stat {
u_int32_t st_blksize; /* optimal blocksize for I/O */
u_int32_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
- int32_t st_lspare;
+ int32_t st_lspare1;
+#ifndef _POSIX_SOURCE
+ struct timespec __st_birthtimespec; /* time of file creation */
+#else
+ time_t __st_birthtime; /* time of file creation */
+ long __st_birthtimensec; /* nsec of file creation */
+#endif
int64_t st_qspare[2];
};
#ifndef _POSIX_SOURCE
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 11d7d13e287..ebfa5347634 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.25 2004/06/08 18:19:00 deraadt Exp $ */
+/* $OpenBSD: types.h,v 1.26 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */
/*-
@@ -72,8 +72,8 @@ typedef u_int32_t gid_t; /* group id */
typedef u_int32_t id_t; /* may contain pid, uid or gid */
typedef u_int32_t ino_t; /* inode number */
typedef long key_t; /* IPC key (for Sys V IPC) */
-typedef u_int16_t mode_t; /* permissions */
-typedef u_int16_t nlink_t; /* link count */
+typedef u_int32_t mode_t; /* permissions */
+typedef u_int32_t nlink_t; /* link count */
typedef int32_t pid_t; /* process id */
typedef u_quad_t rlim_t; /* resource limit */
typedef int32_t segsz_t; /* segment size */
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 8f12361e168..1e2b9569cf4 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.58 2004/01/09 03:01:03 tedu Exp $ */
+/* $OpenBSD: vnode.h,v 1.59 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -149,8 +149,8 @@ struct vnode {
*/
struct vattr {
enum vtype va_type; /* vnode type (for create) */
- u_short va_mode; /* files access mode and type */
- short va_nlink; /* number of references to file */
+ mode_t va_mode; /* files access mode and type */
+ nlink_t va_nlink; /* number of references to file */
uid_t va_uid; /* owner user id */
gid_t va_gid; /* owner group id */
long va_fsid; /* file system id (dev for now) */
diff --git a/sys/ufs/ext2fs/ext2fs_alloc.c b/sys/ufs/ext2fs/ext2fs_alloc.c
index 49302e497ff..15392998e1e 100644
--- a/sys/ufs/ext2fs/ext2fs_alloc.c
+++ b/sys/ufs/ext2fs/ext2fs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_alloc.c,v 1.15 2004/06/21 23:50:38 tholo Exp $ */
+/* $OpenBSD: ext2fs_alloc.c,v 1.16 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ext2fs_alloc.c,v 1.10 2001/07/05 08:38:27 toshii Exp $ */
/*
@@ -136,7 +136,7 @@ nospace:
* available inode is located.
*/
int
-ext2fs_inode_alloc(struct inode *pip, int mode, struct ucred *cred,
+ext2fs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *cred,
struct vnode **vpp)
{
struct vnode *pvp;
@@ -529,7 +529,7 @@ ext2fs_blkfree(ip, bno)
* The specified inode is placed back in the free map.
*/
int
-ext2fs_inode_free(struct inode *pip, ino_t ino, int mode)
+ext2fs_inode_free(struct inode *pip, ino_t ino, mode_t mode)
{
register struct m_ext2fs *fs;
register char *ibp;
diff --git a/sys/ufs/ext2fs/ext2fs_extern.h b/sys/ufs/ext2fs/ext2fs_extern.h
index b7a097c5846..141b6177ca6 100644
--- a/sys/ufs/ext2fs/ext2fs_extern.h
+++ b/sys/ufs/ext2fs/ext2fs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_extern.h,v 1.19 2004/03/02 05:52:24 tedu Exp $ */
+/* $OpenBSD: ext2fs_extern.h,v 1.20 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ext2fs_extern.h,v 1.1 1997/06/11 09:33:55 bouyer Exp $ */
/*-
@@ -61,11 +61,11 @@ int ext2fs_alloc(struct inode *, ufs1_daddr_t, ufs1_daddr_t , struct ucred *,
int ext2fs_realloccg(struct inode *, ufs1_daddr_t, ufs1_daddr_t, int, int,
struct ucred *, struct buf **);
int ext2fs_reallocblks(void *);
-int ext2fs_inode_alloc(struct inode *pip, int mode, struct ucred *,
+int ext2fs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *,
struct vnode **);
daddr_t ext2fs_blkpref(struct inode *, ufs1_daddr_t, int, ufs1_daddr_t *);
void ext2fs_blkfree(struct inode *, ufs1_daddr_t);
-int ext2fs_inode_free(struct inode *pip, ino_t ino, int mode);
+int ext2fs_inode_free(struct inode *pip, ino_t ino, mode_t mode);
/* ext2fs_balloc.c */
int ext2fs_buf_alloc(struct inode *, daddr_t, int, struct ucred *,
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index c40edb65315..8428daf712c 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.35 2004/06/24 19:35:26 tholo Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.36 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -72,7 +72,7 @@
#include <ufs/ext2fs/ext2fs_dir.h>
-static int ext2fs_chmod(struct vnode *, int, struct ucred *, struct proc *);
+static int ext2fs_chmod(struct vnode *, mode_t, struct ucred *, struct proc *);
static int ext2fs_chown(struct vnode *, uid_t, gid_t, struct ucred *, struct proc *);
union _qcvt {
@@ -380,7 +380,7 @@ ext2fs_setattr(v)
static int
ext2fs_chmod(vp, mode, cred, p)
register struct vnode *vp;
- register int mode;
+ register mode_t mode;
register struct ucred *cred;
struct proc *p;
{
@@ -976,7 +976,8 @@ ext2fs_mkdir(v)
register struct inode *ip, *dp;
struct vnode *tvp;
struct ext2fs_dirtemplate dirtemplate;
- int error, dmode;
+ mode_t dmode;
+ int error;
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
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");
diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h
index 1106506a099..12c6f5ce9f6 100644
--- a/sys/ufs/ufs/inode.h
+++ b/sys/ufs/ufs/inode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: inode.h,v 1.26 2004/06/21 23:50:38 tholo Exp $ */
+/* $OpenBSD: inode.h,v 1.27 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: inode.h,v 1.8 1995/06/15 23:22:50 cgd Exp $ */
/*
@@ -122,9 +122,9 @@ struct inode_vtbl {
struct ucred *);
int (* iv_update)(struct inode *, struct timespec *, struct timespec *,
int waitfor);
- int (* iv_inode_alloc)(struct inode *, int mode,
+ int (* iv_inode_alloc)(struct inode *, mode_t mode,
struct ucred *, struct vnode **);
- int (* iv_inode_free)(struct inode *, ino_t ino, int mode);
+ int (* iv_inode_free)(struct inode *, ino_t ino, mode_t mode);
int (* iv_buf_alloc)(struct inode *, off_t, int, struct ucred *,
int, struct buf **);
int (* iv_bufatoff)(struct inode *, off_t offset, char **res,
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index 68ffe1fcafa..be9d5b0222a 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_inode.c,v 1.21 2004/01/20 03:44:06 tedu Exp $ */
+/* $OpenBSD: ufs_inode.c,v 1.22 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */
/*
@@ -87,7 +87,8 @@ ufs_inactive(v)
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
struct proc *p = ap->a_p;
- int mode, error = 0;
+ mode_t mode;
+ int error = 0;
extern int prtactive;
if (prtactive && vp->v_usecount != 0)
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index c7797cd56a9..f1aa4821891 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_readwrite.c,v 1.25 2003/06/02 23:28:23 millert Exp $ */
+/* $OpenBSD: ufs_readwrite.c,v 1.26 2004/07/13 21:04:29 millert Exp $ */
/* $NetBSD: ufs_readwrite.c,v 1.9 1996/05/11 18:27:57 mycroft Exp $ */
/*-
@@ -80,8 +80,8 @@ READ(v)
daddr_t lbn, nextlbn;
off_t bytesinfile;
long size, xfersize, blkoffset;
+ mode_t mode;
int error;
- u_short mode;
vp = ap->a_vp;
ip = VTOI(vp);