Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/41394 )
Change subject: base: Remove hostname from hostinfo
......................................................................
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 <[email protected]>
---
M src/base/hostinfo.cc
M src/base/hostinfo.hh
2 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/src/base/hostinfo.cc b/src/base/hostinfo.cc
index 577ab01..0e11f3f 100644
--- a/src/base/hostinfo.cc
+++ b/src/base/hostinfo.cc
@@ -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)
diff --git a/src/base/hostinfo.hh b/src/base/hostinfo.hh
index 3efb6f4..d8a8910 100644
--- a/src/base/hostinfo.hh
+++ b/src/base/hostinfo.hh
@@ -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.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41394
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I20919a49b123a6a49582d9cfacf1fd167cb44776
Gerrit-Change-Number: 41394
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s