sysinfo;posix: ensure strings are quoted
This commit is contained in:
parent
4edd8d8c3e
commit
83449cf8d2
@ -30,14 +30,14 @@ cruft::util::operator<< (std::ostream &os, sysinfo const &)
|
|||||||
struct utsname name;
|
struct utsname name;
|
||||||
cruft::posix::error::try_code (uname (&name));
|
cruft::posix::error::try_code (uname (&name));
|
||||||
|
|
||||||
os << "os: { name: " << name.sysname << ", version: " << name.version
|
os << "os: { name: '" << name.sysname << "', version: '" << name.version << "' }"
|
||||||
<< " }, hostname: " << name.nodename;
|
<< ", hostname: '" << name.nodename << '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto const uid = geteuid ();
|
auto const uid = geteuid ();
|
||||||
auto const user = getpwuid (uid);
|
auto const user = getpwuid (uid);
|
||||||
os << ", username: " << user->pw_name;
|
os << ", username: '" << user->pw_name << '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user