Deleted Added
full compact
kern_descrip.c (252436) kern_descrip.c (254356)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 252436 2013-07-01 03:27:14Z trociny $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 254356 2013-08-15 07:54:31Z glebius $");
39
40#include "opt_capsicum.h"
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_ktrace.h"
44#include "opt_procdesc.h"
45
46#include <sys/param.h>

--- 3835 unchanged lines hidden (view full) ---

3882static int
3883badfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
3884 struct thread *td)
3885{
3886
3887 return (EBADF);
3888}
3889
39
40#include "opt_capsicum.h"
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_ktrace.h"
44#include "opt_procdesc.h"
45
46#include <sys/param.h>

--- 3835 unchanged lines hidden (view full) ---

3882static int
3883badfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
3884 struct thread *td)
3885{
3886
3887 return (EBADF);
3888}
3889
3890static int
3891badfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
3892 struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags,
3893 int kflags, struct thread *td)
3894{
3895
3896 return (EBADF);
3897}
3898
3890struct fileops badfileops = {
3891 .fo_read = badfo_readwrite,
3892 .fo_write = badfo_readwrite,
3893 .fo_truncate = badfo_truncate,
3894 .fo_ioctl = badfo_ioctl,
3895 .fo_poll = badfo_poll,
3896 .fo_kqfilter = badfo_kqfilter,
3897 .fo_stat = badfo_stat,
3898 .fo_close = badfo_close,
3899 .fo_chmod = badfo_chmod,
3900 .fo_chown = badfo_chown,
3899struct fileops badfileops = {
3900 .fo_read = badfo_readwrite,
3901 .fo_write = badfo_readwrite,
3902 .fo_truncate = badfo_truncate,
3903 .fo_ioctl = badfo_ioctl,
3904 .fo_poll = badfo_poll,
3905 .fo_kqfilter = badfo_kqfilter,
3906 .fo_stat = badfo_stat,
3907 .fo_close = badfo_close,
3908 .fo_chmod = badfo_chmod,
3909 .fo_chown = badfo_chown,
3910 .fo_sendfile = badfo_sendfile,
3901};
3902
3903int
3904invfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
3905 struct thread *td)
3906{
3907
3908 return (EINVAL);
3909}
3910
3911int
3912invfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
3913 struct thread *td)
3914{
3915
3916 return (EINVAL);
3917}
3918
3911};
3912
3913int
3914invfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
3915 struct thread *td)
3916{
3917
3918 return (EINVAL);
3919}
3920
3921int
3922invfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,
3923 struct thread *td)
3924{
3925
3926 return (EINVAL);
3927}
3928
3929int
3930invfo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
3931 struct uio *trl_uio, off_t offset, size_t nbytes, off_t *sent, int flags,
3932 int kflags, struct thread *td)
3933{
3934
3935 return (EINVAL);
3936}
3937
3919/*-------------------------------------------------------------------*/
3920
3921/*
3922 * File Descriptor pseudo-device driver (/dev/fd/).
3923 *
3924 * Opening minor device N dup()s the file (if any) connected to file
3925 * descriptor N belonging to the calling process. Note that this driver
3926 * consists of only the ``open()'' routine, because all subsequent

--- 45 unchanged lines hidden ---
3938/*-------------------------------------------------------------------*/
3939
3940/*
3941 * File Descriptor pseudo-device driver (/dev/fd/).
3942 *
3943 * Opening minor device N dup()s the file (if any) connected to file
3944 * descriptor N belonging to the calling process. Note that this driver
3945 * consists of only the ``open()'' routine, because all subsequent

--- 45 unchanged lines hidden ---