Re: [PATCH v8 05/15] bugreport: add uname info
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 20, 2020, 20:12 UTC
- Message-ID
- <xmqqzhdd9fw5.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20200220015858.181086-6-emilyshaffer@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
> + /* system call for other version info */ > + strbuf_addstr(sys_info, "uname -a: ");
Is that "-a" portable across systems? That is, when given "-a", would "uname" on all platforms show sysname, release, version and machine in that order and nothing else?
If we are merely saying "in this section, we are showing a selected subset from what we learned about the system with uname(2)", perhaps just stop at saying "uname: "?
> + if (uname(&uname_info)) > + strbuf_addf(sys_info, "uname() failed with code %d\n", errno);
i18n/l10n? Don't we want to use strerror() here?
Show 9 quoted lines
> + else
> + strbuf_addf(sys_info, "%s %s %s %s\n",
> + uname_info.sysname,
> + uname_info.release,
> + uname_info.version,
> + uname_info.machine);
> }
>
> static const char * const bugreport_usage[] = {