1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 89319 2002-01-14 00:13:45Z alfred $
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/conf.h>
36#include <sys/dirent.h>
--- 102 unchanged lines hidden (view full) ---
139
140 error = fget(td, td->td_retval[0], &fp);
141 PROC_UNLOCK(p);
142 if (!error) {
143 if (fp->f_type == DTYPE_VNODE)
144 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td);
145 fdrop(fp, td);
146 }
147 } else
148 PROC_UNLOCK(p);
149#ifdef DEBUG
150 if (ldebug(open))
151 printf(LMSG("open returns error %d"), error);
152#endif
153 return error;
154}
155
156int
157linux_lseek(struct thread *td, struct linux_lseek_args *args)
158{
159
160 struct lseek_args /* {
--- 1024 unchanged lines hidden ---
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/compat/linux/linux_file.c 89319 2002-01-14 00:13:45Z alfred $
29 */
30
31#include "opt_compat.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/conf.h>
36#include <sys/dirent.h>
--- 102 unchanged lines hidden (view full) ---
139
140 error = fget(td, td->td_retval[0], &fp);
141 PROC_UNLOCK(p);
142 if (!error) {
143 if (fp->f_type == DTYPE_VNODE)
144 fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td);
145 fdrop(fp, td);
146 }
147 } else
148 PROC_UNLOCK(p);
149#ifdef DEBUG
150 if (ldebug(open))
151 printf(LMSG("open returns error %d"), error);
152#endif
153 return error;
154}
155
156int
157linux_lseek(struct thread *td, struct linux_lseek_args *args)
158{
159
160 struct lseek_args /* {
--- 1024 unchanged lines hidden ---