[Toybox] Pending todoness.
enh
enh at google.com
Thu Sep 16 18:14:10 PDT 2021
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.)
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?
On Thu, Sep 16, 2021 at 6:05 PM Rob Landley <rob at landley.net> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210916/e7f6cfe9/attachment.htm>
More information about the Toybox
mailing list