Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/netbsd32 Add support for fsync_range(2).



details:   https://anonhg.NetBSD.org/src/rev/cc21b99234e2
branches:  trunk
changeset: 582888:cc21b99234e2
user:      cube <cube%NetBSD.org@localhost>
date:      Sun Jul 10 14:32:16 2005 +0000

description:
Add support for fsync_range(2).

diffstat:

 sys/compat/netbsd32/netbsd32_netbsd.c |  22 ++++++++++++++++++++--
 sys/compat/netbsd32/syscalls.master   |   5 +++--
 2 files changed, 23 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r 96b3728516b0 -r cc21b99234e2 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Sun Jul 10 14:26:02 2005 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Sun Jul 10 14:32:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.93 2005/07/10 11:28:58 cube Exp $        */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.94 2005/07/10 14:32:16 cube Exp $        */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.93 2005/07/10 11:28:58 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.94 2005/07/10 14:32:16 cube Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ddb.h"
@@ -2557,3 +2557,21 @@
        NETBSD32TOP_UAP(stack, void);
        return sys___clone(l, &ua, retval);
 }
+
+int
+netbsd32_fsync_range(struct lwp *l, void *v, register_t *retval)
+{
+       struct netbsd32_fsync_range_args /* {
+               syscallarg(int) fd;
+               syscallarg(int) flags;
+               syscallarg(off_t) start;
+               syscallarg(off_t) length;
+       } */ *uap = v;
+       struct sys_fsync_range_args ua;
+
+       NETBSD32TO64_UAP(fd);
+       NETBSD32TO64_UAP(flags);
+       NETBSD32TO64_UAP(start);
+       NETBSD32TO64_UAP(length);
+       return (sys_fsync_range(l, &ua, retval));
+}
diff -r 96b3728516b0 -r cc21b99234e2 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master       Sun Jul 10 14:26:02 2005 +0000
+++ b/sys/compat/netbsd32/syscalls.master       Sun Jul 10 14:32:16 2005 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.32 2005/07/10 11:28:58 cube Exp $
+       $NetBSD: syscalls.master,v 1.33 2005/07/10 14:32:16 cube Exp $
 
 ;      from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;      @(#)syscalls.master     8.2 (Berkeley) 1/13/94
@@ -551,7 +551,8 @@
 351    UNIMPL
 352    UNIMPL
 353    UNIMPL
-354    UNIMPL
+354    STD             { int netbsd32_fsync_range(int fd, int flags, off_t start, \
+                           off_t length); }
 355    STD             { int netbsd32_uuidgen(netbsd32_uuidp_t store, int count); }
 356    STD             { int netbsd32_getvfsstat(netbsd32_statvfsp_t buf, \
                            netbsd32_size_t bufsize, int flags); }



Home | Main Index | Thread Index | Old Index