Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/linux/common add linux_sys_truncate64()



details:   https://anonhg.NetBSD.org/src/rev/11197017ac5e
branches:  trunk
changeset: 500499:11197017ac5e
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Dec 12 22:24:56 2000 +0000

description:
add linux_sys_truncate64()

diffstat:

 sys/compat/linux/common/linux_file64.c |  19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 313d622f5a30 -r 11197017ac5e sys/compat/linux/common/linux_file64.c
--- a/sys/compat/linux/common/linux_file64.c    Tue Dec 12 22:23:47 2000 +0000
+++ b/sys/compat/linux/common/linux_file64.c    Tue Dec 12 22:24:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_file64.c,v 1.1 2000/12/12 19:02:00 jdolecek Exp $        */
+/*     $NetBSD: linux_file64.c,v 1.2 2000/12/12 22:24:56 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -203,3 +203,20 @@
 
        return linux_do_stat64(p, uap, retval, 1);
 }
+
+int
+linux_sys_truncate64(p, v, retval)
+       struct proc *p;
+       void *v;
+       register_t *retval;
+{
+       struct linux_sys_truncate64_args /* {
+               syscallarg(const char *) path;
+               syscallarg(off_t) length;
+       } */ *uap = v;
+       caddr_t sg = stackgap_init(p->p_emul);
+
+       CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
+
+       return sys_truncate(p, uap, retval);
+}



Home | Main Index | Thread Index | Old Index