forked from pool/coreutils
d58c8ecf79
Bug fixes * cp and mv once again support preserving extended attributes. * cp now preserves "capabilities" when also preserving file ownership.7 * ls --color once again honors the 'NORMAL' dircolors directive. [bug introduced in coreutils-6.11] * sort -M now handles abbreviated months that are aligned using blanks in the locale database. Also locales with 8 bit characters are handled correctly, including multi byte locales with the caveat that multi byte characters are matched case sensitively. * sort again handles obsolescent key formats (+POS -POS) correctly. Previously if -POS was specified, 1 field too many was used in the sort. [bug introduced in coreutils-7.2] New features * join now accepts the --header option, to treat the first line of each file as a header line to be joined and printed unconditionally. * timeout now accepts the --kill-after option which sends a kill signal to the monitored command if it's still running the specified duration after the initial signal was sent. * who: the "+/-" --mesg (-T) indicator of whether a user/tty is accepting messages could be incorrectly listed as "+", when in fact, the user was not accepting messages (mesg no). Before, who would examine only the permission bits, and not consider the group of the TTY device file. Thus, if a login tty's group would change somehow e.g., to "root", that would make it unwritable (via write(1)) by normal users, in spite of whatever the permission bits might imply. Now, when configured using the --with-tty-group[=NAME] option, who also compares the group of the TTY device with NAME (or "tty" if no group name is specified). Changes in behavior * ls --color no longer emits the final 3-byte color-resetting escape sequence when it would be a no-op. * join -t '' no longer emits an error and instead operates on each line as a whole (even if they contain NUL characters). For other changes since 7.1 see NEWS. - Split-up coreutils-%%{version}.diff as far as possible. - Prefix all patches with coreutils-. - All patches have the .patch suffix. - Use the i18n patch from Archlinux as it fixes at least one test suite failure. OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=9
61 lines
1.7 KiB
Diff
61 lines
1.7 KiB
Diff
Index: src/uname.c
|
|
===================================================================
|
|
--- src/uname.c.orig 2010-01-01 14:06:47.000000000 +0100
|
|
+++ src/uname.c 2010-05-05 13:58:03.471359120 +0200
|
|
@@ -339,6 +339,36 @@ main (int argc, char **argv)
|
|
# endif
|
|
}
|
|
#endif
|
|
+ if (element == unknown)
|
|
+ {
|
|
+ struct utsname name;
|
|
+ static char processor[sizeof (name.machine)];
|
|
+ if (uname (&name) != 0)
|
|
+ error (EXIT_FAILURE, errno, _("cannot get system name"));
|
|
+ strcpy (processor, name.machine);
|
|
+ element = processor;
|
|
+#ifdef __linux__
|
|
+ if (!strcmp (element, "i686"))
|
|
+ {
|
|
+ /* Check for Athlon */
|
|
+ char line[1024];
|
|
+ FILE *f = fopen ("/proc/cpuinfo", "r");
|
|
+ if (f)
|
|
+ {
|
|
+ while (fgets (line, sizeof (line), f) > 0)
|
|
+ {
|
|
+ if (strncmp (line, "vendor_id", 9) == 0)
|
|
+ {
|
|
+ if (strstr (line, "AuthenticAMD"))
|
|
+ element = "athlon";
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
+ fclose (f);
|
|
+ }
|
|
+ }
|
|
+#endif
|
|
+ }
|
|
if (! (toprint == UINT_MAX && element == unknown))
|
|
print_element (element);
|
|
}
|
|
@@ -364,6 +394,18 @@ main (int argc, char **argv)
|
|
element = hardware_platform;
|
|
}
|
|
#endif
|
|
+ if (element == unknown)
|
|
+ {
|
|
+ struct utsname name;
|
|
+ static char hardware_platform[sizeof (name.machine)];
|
|
+ if (uname (&name) != 0)
|
|
+ error (EXIT_FAILURE, errno, _("cannot get system name"));
|
|
+ strcpy (hardware_platform, name.machine);
|
|
+ if (hardware_platform[0] == 'i' && hardware_platform[2] == '8'
|
|
+ && hardware_platform[3] == '6' && hardware_platform[4] == 0)
|
|
+ hardware_platform[1] = '3';
|
|
+ element = hardware_platform;
|
|
+ }
|
|
if (! (toprint == UINT_MAX && element == unknown))
|
|
print_element (element);
|
|
}
|