Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/darwin swapped the words in lseek offset reassemb...



details:   https://anonhg.NetBSD.org/src/rev/a7375d23bc93
branches:  trunk
changeset: 546088:a7375d23bc93
user:      manu <manu%NetBSD.org@localhost>
date:      Sun Apr 20 14:36:05 2003 +0000

description:
swapped the words in lseek offset reassembly (that was was confused-endian)
Removed useless include that came from a copy/paste.

diffstat:

 sys/compat/darwin/darwin_unistd.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 419450db25c9 -r a7375d23bc93 sys/compat/darwin/darwin_unistd.c
--- a/sys/compat/darwin/darwin_unistd.c Sun Apr 20 14:21:13 2003 +0000
+++ b/sys/compat/darwin/darwin_unistd.c Sun Apr 20 14:36:05 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: darwin_unistd.c,v 1.2 2003/04/20 00:32:16 christos Exp $ */
+/*     $NetBSD: darwin_unistd.c,v 1.3 2003/04/20 14:36:05 manu Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,9 +36,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_unistd.c,v 1.2 2003/04/20 00:32:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_unistd.c,v 1.3 2003/04/20 14:36:05 manu Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -75,8 +74,9 @@
         * argument going through our syscall machinery, we declare
         * it as two long arguments, and we reassemble them here.
         */
-       off.l[_QUAD_LOWWORD] = (u_long)SCARG(uap, off1);
-       off.l[_QUAD_HIGHWORD] = (u_long)SCARG(uap, off2);
+       off.l[_QUAD_LOWWORD] = (u_long)SCARG(uap, off2);
+       off.l[_QUAD_HIGHWORD] = (u_long)SCARG(uap, off1);
+
        SCARG(&cup, offset) = off.o;
 
        return sys_lseek(l, &cup, retval);



Home | Main Index | Thread Index | Old Index