aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index efa3ec2837..68484a83e6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6786,12 +6786,15 @@ static int is_proc_myself(const char *filename, const char *entry)
return 0;
}
-#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
+#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) || \
+ defined(TARGET_SPARC)
static int is_proc(const char *filename, const char *entry)
{
return strcmp(filename, entry) == 0;
}
+#endif
+#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
static int open_net_route(void *cpu_env, int fd)
{
FILE *fp;
@@ -6836,6 +6839,14 @@ static int open_net_route(void *cpu_env, int fd)
}
#endif
+#if defined(TARGET_SPARC)
+static int open_cpuinfo(void *cpu_env, int fd)
+{
+ dprintf(fd, "type\t\t: sun4u\n");
+ return 0;
+}
+#endif
+
static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, mode_t mode)
{
struct fake_open {
@@ -6852,6 +6863,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
{ "/proc/net/route", open_net_route, is_proc },
#endif
+#if defined(TARGET_SPARC)
+ { "/proc/cpuinfo", open_cpuinfo, is_proc },
+#endif
{ NULL, NULL, NULL }
};