diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_event.c | 4 | ||||
-rw-r--r-- | sys/kern/sys_pipe.c | 4 | ||||
-rw-r--r-- | sys/kern/sys_socket.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 7 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/sys/file.h | 7 |
7 files changed, 15 insertions, 19 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index fe67f33f7dd..ddb8be808e9 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.54 2019/12/30 09:30:31 mpi Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.55 2020/01/05 13:46:02 visa Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -1549,7 +1549,7 @@ dmabuf_seek(struct file *fp, off_t *offset, int whence, struct proc *p) return (0); } -struct fileops dmabufops = { +const struct fileops dmabufops = { .fo_read = dmabuf_read, .fo_write = dmabuf_write, .fo_ioctl = dmabuf_ioctl, diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 3141af589ce..07eb03c6bd2 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.114 2020/01/03 05:37:00 visa Exp $ */ +/* $OpenBSD: kern_event.c,v 1.115 2020/01/05 13:46:02 visa Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -72,7 +72,7 @@ void kqueue_wakeup(struct kqueue *kq); static void kqueue_expand_hash(struct kqueue *kq); static void kqueue_expand_list(struct kqueue *kq, int fd); -struct fileops kqueueops = { +const struct fileops kqueueops = { .fo_read = kqueue_read, .fo_write = kqueue_write, .fo_ioctl = kqueue_ioctl, diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index da8a96e5dd4..8ad10e8b461 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.108 2020/01/04 09:38:27 anton Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.109 2020/01/05 13:46:02 visa Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -60,7 +60,7 @@ int pipe_kqfilter(struct file *fp, struct knote *kn); int pipe_ioctl(struct file *, u_long, caddr_t, struct proc *); int pipe_stat(struct file *fp, struct stat *ub, struct proc *p); -static struct fileops pipeops = { +static const struct fileops pipeops = { .fo_read = pipe_read, .fo_write = pipe_write, .fo_ioctl = pipe_ioctl, diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 0676d907f32..a8eab48eeb0 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_socket.c,v 1.42 2018/11/19 13:15:37 visa Exp $ */ +/* $OpenBSD: sys_socket.c,v 1.43 2020/01/05 13:46:02 visa Exp $ */ /* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */ /* @@ -48,7 +48,7 @@ #include <net/if.h> #include <net/route.h> -struct fileops socketops = { +const struct fileops socketops = { .fo_read = soo_read, .fo_write = soo_write, .fo_ioctl = soo_ioctl, diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 67fbec19db9..e3956948a27 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.182 2019/07/16 21:41:37 bluhm Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.183 2020/01/05 13:46:02 visa Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -60,11 +60,6 @@ #include <netinet/in.h> #include <net/route.h> -/* - * System call interface to the socket abstraction. - */ -extern struct fileops socketops; - int copyaddrout(struct proc *, struct mbuf *, struct sockaddr *, socklen_t, socklen_t *); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 7cd295b6239..2e5f64e3b86 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.110 2019/12/08 12:29:42 mpi Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.111 2020/01/05 13:46:02 visa Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -66,7 +66,7 @@ int vn_kqfilter(struct file *, struct knote *); int vn_closefile(struct file *, struct proc *); int vn_seek(struct file *, off_t *, int, struct proc *); -struct fileops vnops = { +const struct fileops vnops = { .fo_read = vn_read, .fo_write = vn_write, .fo_ioctl = vn_ioctl, diff --git a/sys/sys/file.h b/sys/sys/file.h index 7fb36a52b6a..540ad6f7bf7 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.58 2019/08/05 08:35:59 anton Exp $ */ +/* $OpenBSD: file.h,v 1.59 2020/01/05 13:46:02 visa Exp $ */ /* $NetBSD: file.h,v 1.11 1995/03/26 20:24:13 jtc Exp $ */ /* @@ -89,7 +89,7 @@ struct file { short f_type; /* [I] descriptor type */ u_int f_count; /* [a] reference count */ struct ucred *f_cred; /* [I] credentials associated with descriptor */ - struct fileops *f_ops; /* [I] file operation pointers */ + const struct fileops *f_ops; /* [I] file operation pointers */ off_t f_offset; /* [f,v] offset */ void *f_data; /* [I] private data */ int f_iflags; /* [k] internal flags */ @@ -131,6 +131,7 @@ foffset(struct file *fp) LIST_HEAD(filelist, file); extern int maxfiles; /* kernel limit on number of open files */ extern int numfiles; /* actual number of open files */ -extern struct fileops vnops; /* vnode operations for files */ +extern const struct fileops socketops; /* socket operations for files */ +extern const struct fileops vnops; /* vnode operations for files */ #endif /* _KERNEL */ |