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 revisions 1.82-1.83 (re...
details: https://anonhg.NetBSD.org/src/rev/97ee57c04d7c
branches: netbsd-1-5
changeset: 490993:97ee57c04d7c
user: he <he%NetBSD.org@localhost>
date: Fri Mar 30 21:41:32 2001 +0000
description:
Pull up revisions 1.82-1.83 (requested by fvdl):
Add some required Linux emulation bits to support the Linux
version of VMware.
diffstat:
sys/compat/linux/common/linux_misc.c | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
diffs (51 lines):
diff -r 0efe1fd0a35d -r 97ee57c04d7c sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Fri Mar 30 21:41:01 2001 +0000
+++ b/sys/compat/linux/common/linux_misc.c Fri Mar 30 21:41:32 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.69.4.1 2000/09/11 19:25:35 fvdl Exp $ */
+/* $NetBSD: linux_misc.c,v 1.69.4.2 2001/03/30 21:41:32 he Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -338,6 +338,10 @@
return copyout((caddr_t) <mp, (caddr_t) SCARG(uap, sp), sizeof ltmp);
}
+char linux_sysname[] = "Linux";
+char linux_release[] = "2.0.38";
+char linux_version[] = "#0 Sun Apr 1 11:11:11 MET 2000";
+
/*
* uname(). Just copy the info from the various strings stored in the
* kernel, and put it in the Linux utsname structure. That structure
@@ -354,27 +358,14 @@
syscallarg(struct linux_utsname *) up;
} */ *uap = v;
struct linux_utsname luts;
- int len;
- char *cp;
- strncpy(luts.l_sysname, ostype, sizeof(luts.l_sysname));
+ strncpy(luts.l_sysname, linux_sysname, sizeof(luts.l_sysname));
strncpy(luts.l_nodename, hostname, sizeof(luts.l_nodename));
- strncpy(luts.l_release, osrelease, sizeof(luts.l_release));
- strncpy(luts.l_version, version, sizeof(luts.l_version));
+ strncpy(luts.l_release, linux_release, sizeof(luts.l_release));
+ strncpy(luts.l_version, linux_version, sizeof(luts.l_version));
strncpy(luts.l_machine, machine, sizeof(luts.l_machine));
strncpy(luts.l_domainname, domainname, sizeof(luts.l_domainname));
- /* This part taken from the uname() in libc */
- len = sizeof(luts.l_version);
- for (cp = luts.l_version; len--; ++cp) {
- if (*cp == '\n' || *cp == '\t') {
- if (len > 1)
- *cp = ' ';
- else
- *cp = '\0';
- }
- }
-
return copyout(&luts, SCARG(uap, up), sizeof(luts));
}
Home |
Main Index |
Thread Index |
Old Index