diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-03-25 02:37:20 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-03-25 02:37:20 +0000 |
commit | fa15f702d2e4c7d377d6cf89e950227405622f1b (patch) | |
tree | 3dc3c890ed2bc1b14143272e556320fdeb56e091 /coreutils/uname.c | |
parent | ef8b112d77c3a05f17fa108d93d44d9a66902853 (diff) | |
download | busybox-w32-fa15f702d2e4c7d377d6cf89e950227405622f1b.tar.gz busybox-w32-fa15f702d2e4c7d377d6cf89e950227405622f1b.tar.bz2 busybox-w32-fa15f702d2e4c7d377d6cf89e950227405622f1b.zip |
Work around compiler/assembler problem and reduce code size at the same time.
Diffstat (limited to 'coreutils/uname.c')
-rw-r--r-- | coreutils/uname.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/coreutils/uname.c b/coreutils/uname.c index b45f4d156..df4f14ea0 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -87,7 +87,7 @@ int uname_main(int argc, char **argv) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | #if defined(__sparc__) && defined(__linux__) | 89 | #if defined(__sparc__) && defined(__linux__) |
90 | if ((fake_sparc != NULL) | 90 | if ((fake_sparc != NULL) |
91 | && ((fake_sparc[0] == 'y') | 91 | && ((fake_sparc[0] == 'y') |
92 | || (fake_sparc[0] == 'Y'))) { | 92 | || (fake_sparc[0] == 'Y'))) { |
93 | strcpy(uname_info.name.machine, "sparc"); | 93 | strcpy(uname_info.name.machine, "sparc"); |
@@ -96,11 +96,16 @@ int uname_main(int argc, char **argv) | |||
96 | 96 | ||
97 | strcpy(uname_info.processor, "unknown"); | 97 | strcpy(uname_info.processor, "unknown"); |
98 | 98 | ||
99 | for (opt=0,delta=utsname_offset ; toprint ; delta++, toprint >>= 1) { | 99 | delta=utsname_offset; |
100 | do { | ||
100 | if (toprint & 1) { | 101 | if (toprint & 1) { |
101 | printf("%s%s", (opt++==0)? "": " ", ((char *)(&uname_info)) + *delta); | 102 | printf(((char *)(&uname_info)) + *delta); |
103 | if (toprint > 1) { | ||
104 | putchar(' '); | ||
105 | } | ||
102 | } | 106 | } |
103 | } | 107 | ++delta; |
108 | } while (toprint >>= 1); | ||
104 | putchar('\n'); | 109 | putchar('\n'); |
105 | 110 | ||
106 | return EXIT_SUCCESS; | 111 | return EXIT_SUCCESS; |