- Special case for ia32e in uname (bug #145266).

This commit is contained in:
Tim Waugh 2005-02-04 18:00:56 +00:00
parent f798006d9b
commit 0cbb012160
2 changed files with 23 additions and 15 deletions

View File

@ -1,15 +1,6 @@
--- coreutils-4.5.3/src/uname.c.sysinfo 2002-08-31 09:52:11.000000000 +0100 --- coreutils-5.2.1/src/uname.c.sysinfo 2004-01-21 22:27:02.000000000 +0000
+++ coreutils-4.5.3/src/uname.c 2002-11-28 18:29:15.000000000 +0000 +++ coreutils-5.2.1/src/uname.c 2005-02-04 17:11:38.854805577 +0000
@@ -232,7 +232,7 @@ @@ -249,6 +249,42 @@
if (toprint & PRINT_KERNEL_RELEASE)
print_element (name.release);
if (toprint & PRINT_KERNEL_VERSION)
- print_element (name.version);
+ print_element (name.version);
if (toprint & PRINT_MACHINE)
print_element (name.machine);
}
@@ -246,6 +246,28 @@
if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
element = processor; element = processor;
} }
@ -33,12 +24,26 @@
+ fclose(f); + fclose(f);
+ } + }
+ } + }
+ if (!strcmp(element,"x86_64")) { /* Check for ia32e */
+ char cinfo[1024];
+ FILE *f=fopen("/proc/cpuinfo", "r");
+ if(f) {
+ while(fgets(cinfo, 1024, f)) {
+ if(!strncmp(cinfo, "vendor_id", 9)) {
+ if(strstr(cinfo, "GenuineIntel"))
+ element="ia32e";
+ break;
+ }
+ }
+ fclose(f);
+ }
+ }
+#endif +#endif
+ } + }
#endif #endif
#ifdef UNAME_PROCESSOR #ifdef UNAME_PROCESSOR
if (element == unknown) if (element == unknown)
@@ -262,7 +284,7 @@ @@ -265,7 +301,7 @@
if (toprint & PRINT_HARDWARE_PLATFORM) if (toprint & PRINT_HARDWARE_PLATFORM)
{ {
@ -47,7 +52,7 @@
#if HAVE_SYSINFO && defined SI_PLATFORM #if HAVE_SYSINFO && defined SI_PLATFORM
{ {
static char hardware_platform[257]; static char hardware_platform[257];
@@ -270,6 +292,14 @@ @@ -273,6 +309,14 @@
hardware_platform, sizeof hardware_platform)) hardware_platform, sizeof hardware_platform))
element = hardware_platform; element = hardware_platform;
} }

View File

@ -4,7 +4,7 @@
Summary: The GNU core utilities: a set of tools commonly used in shell scripts Summary: The GNU core utilities: a set of tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 5.2.1 Version: 5.2.1
Release: 37 Release: 38
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/ Url: http://www.gnu.org/software/coreutils/
@ -249,6 +249,9 @@ fi
/sbin/runuser /sbin/runuser
%changelog %changelog
* Fri Feb 4 2005 Tim Waugh <twaugh@redhat.com> 5.2.1-38
- Special case for ia32e in uname (bug #145266).
* Thu Jan 13 2005 Tim Waugh <twaugh@redhat.com> 5.2.1-37 * Thu Jan 13 2005 Tim Waugh <twaugh@redhat.com> 5.2.1-37
- Fixed zh_CN translation (bug #144845). Patch from Mitrophan Chin. - Fixed zh_CN translation (bug #144845). Patch from Mitrophan Chin.