<div dir="ltr">given that we've never had a `uname -o` on Android before, by definition no-one can have any expectations of what it should output, so seems fine to me. (you could make the same argument for just letting it output "Linux", of course, but since there's _potentially_ value in knowing you're on Android.)<div><br></div><div>i assume the above was the question you were actually asking, but i can't help follow on to ... afaict this non-POSIX, non-BSD, non-macOS flag only exists to put "GNU" in front of "Linux" on Linux systems (which are the only systems that implement the flag anyway)? does anyone have an actual _use_ for this flag?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 16, 2021 at 6:05 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm trying to flamethrower the tree into something releasable, and a lot of<br>
commits I haven't checked in are because I'm not sure about them. This one isn't<br>
_entirely_ my call:<br>
<br>
--- a/toys/posix/uname.c<br>
+++ b/toys/posix/uname.c<br>
@@ -4,7 +4,7 @@<br>
*<br>
* See <a href="http://opengroup.org/onlinepubs/9699919799/utilities/uname.html" rel="noreferrer" target="_blank">http://opengroup.org/onlinepubs/9699919799/utilities/uname.html</a><br>
<br>
-USE_UNAME(NEWTOY(uname, "oamvrns[+os]", TOYFLAG_BIN))<br>
+USE_UNAME(NEWTOY(uname, "oamvrns", TOYFLAG_BIN))<br>
USE_ARCH(NEWTOY(arch, 0, TOYFLAG_USR|TOYFLAG_BIN))<br>
<br>
config ARCH<br>
@@ -54,7 +54,12 @@ void uname_main(void)<br>
struct utsname u;<br>
<br>
uname(&u);<br>
-<br>
+ if (FLAG(o))<br>
+#ifdef __ANDROID__<br>
+ printf("Android");<br>
+#else<br>
+ flags |= FLAG_s;<br>
+#endif<br>
if (!flags) flags = FLAG_s;<br>
for (i=0; i<5; i++) {<br>
char *c = ((char *) &u)+(sizeof(u.sysname)*i);<br>
<br>
Elliott: opinion? (Note:uname.c is already #ifdef salad because of i386.)<br>
<br>
Rob<br>
</blockquote></div>