[Toybox] Pending todoness.

Rob Landley rob at landley.net
Thu Sep 16 18:25:09 PDT 2021


I'm trying to flamethrower the tree into something releasable, and a lot of
commits I haven't checked in are because I'm not sure about them. This one isn't
_entirely_ my call:

--- a/toys/posix/uname.c
+++ b/toys/posix/uname.c
@@ -4,7 +4,7 @@
  *
  * See http://opengroup.org/onlinepubs/9699919799/utilities/uname.html

-USE_UNAME(NEWTOY(uname, "oamvrns[+os]", TOYFLAG_BIN))
+USE_UNAME(NEWTOY(uname, "oamvrns", TOYFLAG_BIN))
 USE_ARCH(NEWTOY(arch, 0, TOYFLAG_USR|TOYFLAG_BIN))

 config ARCH
@@ -54,7 +54,12 @@ void uname_main(void)
   struct utsname u;

   uname(&u);
-
+  if (FLAG(o))
+#ifdef __ANDROID__
+    printf("Android");
+#else
+    flags |= FLAG_s;
+#endif
   if (!flags) flags = FLAG_s;
   for (i=0; i<5; i++) {
     char *c = ((char *) &u)+(sizeof(u.sysname)*i);

Elliott: opinion? (Note:uname.c is already #ifdef salad because of i386.)

Rob



More information about the Toybox mailing list