Skip to content

Commit

Permalink
[fuchsia] Hardware/OS naming working. (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosasco-wk authored May 2, 2023
1 parent 0f67347 commit 7c421de
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions core/os/device/deviceinfo/cc/fuchsia/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,25 @@ device::ABI* abi(device::ABI* abi) {
namespace query {

bool queryPlatform(PlatformInfo* info, std::string* errorMsg) {
#if 0 // TODO: implement
char hostname[HOST_NAME_MAX + 1];
if (gethostname(hostname, sizeof(hostname)) != 0) {
errorMsg->append("gethostname returned error: " + std::to_string(errno));
return false;
}
info->name = hostname;
#endif
info->name = "Sherlock";
info->abis.resize(1);
abi(&info->abis[0]);

#if 0 // TODO: implement
utsname ubuf;
if (uname(&ubuf) != 0) {
errorMsg->append("uname returned error: " + std::to_string(errno));
return false;
}
info->hardwareName = STR_OR_EMPTY(ubuf.machine);
#endif

info->numCpuCores = sysconf(_SC_NPROCESSORS_CONF);

info->osKind = device::Fuchsia;
#if 0 // TODO: implement
info->osName = STR_OR_EMPTY(ubuf.release);
info->osBuild = STR_OR_EMPTY(ubuf.version);
#endif

return true;
}
Expand Down

0 comments on commit 7c421de

Please sign in to comment.