base: Remove hostname from hostinfo

This function is not used anywhere.

In addition, gethostname uses a fixed host name, and
sethostname is not implemented (sim/syscall_emul). If
we were to handle sethostname too it would require a
special conjoint implementation anyway.

Change-Id: I20919a49b123a6a49582d9cfacf1fd167cb44776
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41394
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-02-13 11:45:28 -03:00
committed by Daniel Carvalho
parent eb76992dad
commit 6c32f9e521
2 changed files with 0 additions and 26 deletions

View File

@@ -28,8 +28,6 @@
#include "base/hostinfo.hh"
#include <unistd.h>
#ifdef __APPLE__
#include <mach/mach_init.h>
#include <mach/shared_region.h>
@@ -41,22 +39,6 @@
#include "base/logging.hh"
#include "base/str.hh"
std::string
__get_hostname()
{
char host[256];
if (gethostname(host, sizeof host) == -1)
warn("could not get host name!");
return host;
}
std::string &
hostname()
{
static std::string hostname = __get_hostname();
return hostname;
}
#ifndef __APPLE__
uint64_t
procInfo(const char *filename, const char *target)

View File

@@ -30,14 +30,6 @@
#define __HOSTINFO_HH__
#include <cstdint>
#include <string>
/**
* Get the host name for the current machine.
*
* @return The machine's host name.
*/
std::string &hostname();
/**
* Determine the simulator process' total virtual memory usage.