Add fstatfs syscall.
This commit is contained in:
parent
1aba70bb8a
commit
ca080002aa
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp $
|
||||
$NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp $
|
||||
|
||||
; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
|
||||
; (See syscalls.conf to see what it is processed into.)
|
||||
|
@ -196,7 +196,7 @@
|
|||
98 UNIMPL profil
|
||||
99 STD { int|linux32_sys||statfs(netbsd32_charp path, \
|
||||
linux32_statfsp sp); }
|
||||
100 UNIMPL fstatfs
|
||||
100 STD { int|linux32_sys||fstatfs(int fd, linux32_statfsp sp); }
|
||||
101 UNIMPL ioperm
|
||||
102 STD { int|linux32_sys||socketcall(int what, netbsd32_voidp args); }
|
||||
103 UNIMPL syslog
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $ */
|
||||
/* $NetBSD: linux32_misc.c,v 1.17 2009/06/05 16:45:33 njoly Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.17 2009/06/05 16:45:33 njoly Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -89,6 +89,28 @@ linux32_sys_statfs(struct lwp *l, const struct linux32_sys_statfs_args *uap, reg
|
|||
return error;
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_fstatfs(struct lwp *l, const struct linux32_sys_fstatfs_args *uap, register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(linux32_statfsp) sp;
|
||||
} */
|
||||
struct statvfs *sb;
|
||||
struct linux_statfs ltmp;
|
||||
int error;
|
||||
|
||||
sb = STATVFSBUF_GET();
|
||||
error = do_sys_fstatvfs(l, SCARG(uap, fd), ST_WAIT, sb);
|
||||
if (error == 0) {
|
||||
bsd_to_linux_statfs(sb, <mp);
|
||||
error = copyout(<mp, SCARG_P32(uap, sp), sizeof ltmp);
|
||||
}
|
||||
STATVFSBUF_PUT(sb);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
extern const int linux_ptrace_request_map[];
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue