Added initial support for fcntl64 system call (file locking is not
implemented)
This commit is contained in:
parent
5e62bcc792
commit
238328fb7a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_fcntl.h,v 1.3 1998/10/04 00:02:25 fvdl Exp $ */
|
||||
/* $NetBSD: linux_fcntl.h,v 1.4 2001/09/30 16:04:03 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -75,4 +75,7 @@
|
|||
#define LINUX_LOCK_EX 4
|
||||
#define LINUX_LOCK_SH 8
|
||||
|
||||
#define LINUX_F_GETLK64 12
|
||||
#define LINUX_F_SETLK64 13
|
||||
#define LINUX_F_SETLKW64 14
|
||||
#endif /* !_I386_LINUX_FCNTL_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_fcntl.h,v 1.1 1998/12/15 19:25:40 itohy Exp $ */
|
||||
/* $NetBSD: linux_fcntl.h,v 1.2 2001/09/30 16:04:03 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -83,4 +83,7 @@
|
|||
#define LINUX_LOCK_NB 4
|
||||
#define LINUX_LOCK_UN 8
|
||||
|
||||
#define LINUX_F_GETLK64 12
|
||||
#define LINUX_F_SETLK64 13
|
||||
#define LINUX_F_SETLKW64 14
|
||||
#endif /* !_M68K_LINUX_FCNTL_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_fcntl.h,v 1.1 2001/08/26 15:38:44 manu Exp $ */
|
||||
/* $NetBSD: linux_fcntl.h,v 1.2 2001/09/30 16:04:04 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -84,4 +84,11 @@
|
|||
#define LINUX_LOCK_EX 4 /* F_EXLCK in Linux, and comment "or 3 " */
|
||||
#define LINUX_LOCK_SH 8 /* F_SHLCK in Linux, and comment "or 4' */
|
||||
|
||||
/*
|
||||
* From Linux's include/asm-mips64/fcntl.h
|
||||
*/
|
||||
#define LINUX_F_GETLK64 33
|
||||
#define LINUX_F_SETLK64 34
|
||||
#define LINUX_F_SETLKW64 35
|
||||
|
||||
#endif /* !_MIPS_LINUX_FCNTL_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_fcntl.h,v 1.3 2001/02/04 22:59:26 christos Exp $ */
|
||||
/* $NetBSD: linux_fcntl.h,v 1.4 2001/09/30 16:04:04 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -85,4 +85,8 @@
|
|||
#define LINUX_LOCK_EX 4 /* F_EXLCK in Linux, and comment "or 3 " */
|
||||
#define LINUX_LOCK_SH 8 /* F_SHLCK in Linux, and comment "or 4' */
|
||||
|
||||
#define LINUX_F_GETLK64 12
|
||||
#define LINUX_F_SETLK64 13
|
||||
#define LINUX_F_SETLKW64 14
|
||||
|
||||
#endif /* !_POWERPC_LINUX_FCNTL_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_file64.c,v 1.2 2000/12/12 22:24:56 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_file64.c,v 1.3 2001/09/30 16:04:04 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -220,3 +220,43 @@ linux_sys_truncate64(p, v, retval)
|
|||
|
||||
return sys_truncate(p, uap, retval);
|
||||
}
|
||||
|
||||
#ifndef __alpha__
|
||||
int
|
||||
linux_sys_fcntl64(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux_sys_fcntl64_args /* {
|
||||
syscallarg(unsigned int) fd;
|
||||
syscallarg(unsigned int) cmd;
|
||||
syscallarg(unsigned long) arg;
|
||||
} */ *uap = v;
|
||||
unsigned int fd, cmd;
|
||||
unsigned long arg;
|
||||
int error;
|
||||
|
||||
fd = SCARG(uap, fd);
|
||||
cmd = SCARG(uap, cmd);
|
||||
arg = SCARG(uap, arg);
|
||||
|
||||
switch (cmd) {
|
||||
/* XXX implement this later */
|
||||
case LINUX_F_GETLK64:
|
||||
error = 0;
|
||||
break;
|
||||
case LINUX_F_SETLK64:
|
||||
error = 0;
|
||||
break;
|
||||
case LINUX_F_SETLKW64:
|
||||
error = 0;
|
||||
break;
|
||||
default:
|
||||
error = linux_sys_fcntl(p, v, retval);
|
||||
break;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
#endif /* __alpha__ */
|
||||
|
|
Loading…
Reference in New Issue