Re: [PATCH v13 4/5] bugreport: add uname info
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 8, 2021, 22:19 UTC
- Message-ID
- <87mtu8ifmj.fsf@evledraar.gmail.com>
- In-Reply-To
- <20200416211807.60811-5-emilyshaffer@google.com>
On Thu, Apr 16 2020, Emily Shaffer wrote:
> The contents of uname() can give us some insight into what sort of > system the user is running on, and help us replicate their setup if need > be. The domainname field is not guaranteed to be available, so don't > collect it.
Even with _GNU_SOURCE would anyone care about the domainname (the NIS/YP name, not DNS) these days, as opposed to the portable POSIX "nodename" field you're not including?
In any case, I'd think it's a good idea to omit both. People tend not to want to want to include their FQDN (e.g. their employer), and I can't think of a reason we'd care about it for debugging git.
Show 6 quoted lines
> [...] > + strbuf_addf(sys_info, "%s %s %s %s\n", > + uname_info.sysname, > + uname_info.release, > + uname_info.version, > + uname_info.machine);
Since this is completely free-form I'd think:
"sysname: %s\nrelease: %s\nversion: %s\nmachine: %s\nnodename: %s\ndomainname: %s\n",
Or something like that would be better (after pruning out the fields we don't care about).