2010-05-05 22:22:09 +02:00
|
|
|
Index: src/uname.c
|
|
|
|
===================================================================
|
2013-01-16 20:09:57 +01:00
|
|
|
--- src/uname.c.orig
|
|
|
|
+++ src/uname.c
|
- Update to 8.16:
- Improvements:
* As a GNU extension, 'chmod', 'mkdir', and 'install' now accept
operators '-', '+', '=' followed by octal modes;
* Also, ordinary numeric modes with five or more digits no longer
preserve setuid and setgid bits, so that 'chmod 00755 FOO' now
clears FOO's setuid and setgid bits.
* dd now accepts the count_bytes, skip_bytes iflags and the
seek_bytes oflag, to more easily allow processing portions of a
file.
* dd now accepts the conv=sparse flag to attempt to create sparse
output, by seeking rather than writing to the output file.
* ln now accepts the --relative option, to generate a relative
symbolic link to a target, irrespective of how the target is
specified.
* split now accepts an optional "from" argument to
--numeric-suffixes, which changes the start number from the
default of 0.
* split now accepts the --additional-suffix option, to append an
additional static suffix to output file names.
* basename now supports the -a and -s options, which allow
processing of more than one argument at a time. Also the
complementary -z option was added to delimit output items with
the NUL character.
* dirname now supports more than one argument. Also the complementary
z option was added to delimit output items with the NUL character.
- Bug fixes
* du --one-file-system (-x) would ignore any non-directory
specified on the command line. For example, "touch f; du -x f"
would print nothing. [bug introduced in coreutils-8.15]
* mv now lets you move a symlink onto a same-inode destination
file that has two or more hard links.
* "mv A B" could succeed, yet A would remain.
* realpath no longer mishandles a root directory.
- Improvements
* ls can be much more efficient, especially with large directories
on file systems for which getfilecon-, ACL-check- and XATTR-
check-induced syscalls fail with ENOTSUP or similar.
* 'realpath --relative-base=dir' in isolation now implies
'--relative-to=dir' instead of causing a usage failure.
* split now supports an unlimited number of split files as default
behavior.
For a detaild list se NEWS in the documentation.
- Add up-to-date german translation.
- Add two upstream patches that speed up ls (bnc#752943):
* Cache (l)getfilecon calls to avoid the vast majority of the failing
underlying getxattr syscalls.
* Avoids always-failing queries for whether a file has a nontrivial
ACL and for whether a file has certain "capabilities".
OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=147
2012-04-16 17:12:46 +02:00
|
|
|
@@ -337,6 +337,36 @@ main (int argc, char **argv)
|
2006-12-19 00:15:28 +01:00
|
|
|
# endif
|
2010-07-19 14:13:47 +02:00
|
|
|
}
|
2006-12-19 00:15:28 +01:00
|
|
|
#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))
|
2010-07-19 14:13:47 +02:00
|
|
|
print_element (element);
|
2006-12-19 00:15:28 +01:00
|
|
|
}
|
- Update to 8.16:
- Improvements:
* As a GNU extension, 'chmod', 'mkdir', and 'install' now accept
operators '-', '+', '=' followed by octal modes;
* Also, ordinary numeric modes with five or more digits no longer
preserve setuid and setgid bits, so that 'chmod 00755 FOO' now
clears FOO's setuid and setgid bits.
* dd now accepts the count_bytes, skip_bytes iflags and the
seek_bytes oflag, to more easily allow processing portions of a
file.
* dd now accepts the conv=sparse flag to attempt to create sparse
output, by seeking rather than writing to the output file.
* ln now accepts the --relative option, to generate a relative
symbolic link to a target, irrespective of how the target is
specified.
* split now accepts an optional "from" argument to
--numeric-suffixes, which changes the start number from the
default of 0.
* split now accepts the --additional-suffix option, to append an
additional static suffix to output file names.
* basename now supports the -a and -s options, which allow
processing of more than one argument at a time. Also the
complementary -z option was added to delimit output items with
the NUL character.
* dirname now supports more than one argument. Also the complementary
z option was added to delimit output items with the NUL character.
- Bug fixes
* du --one-file-system (-x) would ignore any non-directory
specified on the command line. For example, "touch f; du -x f"
would print nothing. [bug introduced in coreutils-8.15]
* mv now lets you move a symlink onto a same-inode destination
file that has two or more hard links.
* "mv A B" could succeed, yet A would remain.
* realpath no longer mishandles a root directory.
- Improvements
* ls can be much more efficient, especially with large directories
on file systems for which getfilecon-, ACL-check- and XATTR-
check-induced syscalls fail with ENOTSUP or similar.
* 'realpath --relative-base=dir' in isolation now implies
'--relative-to=dir' instead of causing a usage failure.
* split now supports an unlimited number of split files as default
behavior.
For a detaild list se NEWS in the documentation.
- Add up-to-date german translation.
- Add two upstream patches that speed up ls (bnc#752943):
* Cache (l)getfilecon calls to avoid the vast majority of the failing
underlying getxattr syscalls.
* Avoids always-failing queries for whether a file has a nontrivial
ACL and for whether a file has certain "capabilities".
OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=147
2012-04-16 17:12:46 +02:00
|
|
|
@@ -362,6 +392,18 @@ main (int argc, char **argv)
|
2010-07-19 14:13:47 +02:00
|
|
|
element = hardware_platform;
|
|
|
|
}
|
2006-12-19 00:15:28 +01:00
|
|
|
#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))
|
2010-07-19 14:13:47 +02:00
|
|
|
print_element (element);
|
2006-12-19 00:15:28 +01:00
|
|
|
}
|