Rework Linux sysctl()-emulation, so that on amd64, we return the same

Linux kernel-version as on i386 and ppc (currently 2.4.18), and a date
in Feb 2002.

On all other NetBSD platforms we return a Linux-kernel version of
2.0.38 and a date sometime in 2000, which (AFAIK) predates the
existence of amd64, and therefore predates Linux support for amd64.

To me, it makes much more sense to return the same Linux-kernel-version
and date for both 32-bit x86 and 64-bit x86.

Empirically (and not least), this change also allows SuSE 10 amd64
binaries to run under our Linux amd64 binary emulation (both static
and dynamic-linked, given suitable setup) , which they didn't when we
reported a Linux/x86_64 kernel version of 2.0.38.
This commit is contained in:
jonathan 2006-03-08 03:55:31 +00:00
parent 93edf29420
commit b9c6a2634b
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_sysctl.c,v 1.18 2005/12/11 12:20:19 christos Exp $ */
/* $NetBSD: linux_sysctl.c,v 1.19 2006/03/08 03:55:31 jonathan Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.18 2005/12/11 12:20:19 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.19 2006/03/08 03:55:31 jonathan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.18 2005/12/11 12:20:19 christos E
#include <compat/linux/common/linux_exec.h>
char linux_sysname[128] = "Linux";
#if defined(__i386__) || defined(__powerpc__)
#if defined(__amd64__) || defined(__i386__) || defined(__powerpc__)
char linux_release[128] = "2.4.18";
char linux_version[128] = "#0 Wed Feb 20 20:00:02 CET 2002";
#else