Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/compat/linux/common Pull up revision 1.72:



details:   https://anonhg.NetBSD.org/src/rev/3ec0cf111f7f
branches:  netbsd-1-5
changeset: 489431:3ec0cf111f7f
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Sep 11 19:25:35 2000 +0000

description:
Pull up revision 1.72:
        In the case of MAP_ANON, Linux mmap ignores the fd argument completely.
        So, always pass -1 to the native syscall in that case, to avoid
        errors if a Linux app doesn't specify -1 as the fd (which some do).

approved by thorpej

diffstat:

 sys/compat/linux/common/linux_misc.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 05e8871721c8 -r 3ec0cf111f7f sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c      Mon Sep 11 19:13:14 2000 +0000
+++ b/sys/compat/linux/common/linux_misc.c      Mon Sep 11 19:25:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_misc.c,v 1.69 2000/03/30 11:27:17 augustss Exp $ */
+/*     $NetBSD: linux_misc.c,v 1.69.4.1 2000/09/11 19:25:35 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -415,7 +415,7 @@
        if (SCARG(&cma,prot) & VM_PROT_WRITE) /* XXX */
                SCARG(&cma,prot) |= VM_PROT_READ;
        SCARG(&cma,flags) = flags;
-       SCARG(&cma,fd) = SCARG(uap, fd);
+       SCARG(&cma,fd) = flags & MAP_ANON ? -1 : SCARG(uap, fd);
        SCARG(&cma,pad) = 0;
        SCARG(&cma,pos) = SCARG(uap, offset);
 



Home | Main Index | Thread Index | Old Index