summaryrefslogtreecommitdiffstats
path: root/sim/common/sim-io.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2011-03-21 22:06:55 +0000
committerKevin Buettner <kevinb@redhat.com>2011-03-21 22:06:55 +0000
commit165b70ea60b358163b47407fddcdddca389c87b1 (patch)
tree7313047877c91ace9ac2526466a9de1a458f830d /sim/common/sim-io.c
parentd0f0baa272481979b42d91313ef710e929766a4d (diff)
downloadppe42-binutils-165b70ea60b358163b47407fddcdddca389c87b1.tar.gz
ppe42-binutils-165b70ea60b358163b47407fddcdddca389c87b1.zip
* gennltvals.sh: Search sys/_default_fcntl.h, in addition to
fcntl.h and sys/fcntl.h, for constants. * nltvals.def: Regenerate. * sim-io.c (sim_io_stat, sim_io_fstat): New functions. * sim-io.h (sys/types.h, sys/stat.h): Include. (sim_io_stat, sim_io_fstat): Declare.
Diffstat (limited to 'sim/common/sim-io.c')
-rw-r--r--sim/common/sim-io.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index 68ef3f9561..250f37d6ef 100644
--- a/sim/common/sim-io.c
+++ b/sim/common/sim-io.c
@@ -387,3 +387,15 @@ sim_io_poll_read (SIM_DESC sd,
return sim_io_read (sd, sim_io_fd, buf, sizeof_buf);
#endif
}
+
+int
+sim_io_stat (SIM_DESC sd, const char *path, struct stat *buf)
+{
+ return STATE_CALLBACK (sd)->stat (STATE_CALLBACK (sd), path, buf);
+}
+
+int
+sim_io_fstat (SIM_DESC sd, int fd, struct stat *buf)
+{
+ return STATE_CALLBACK (sd)->fstat (STATE_CALLBACK (sd), fd, buf);
+}
OpenPOWER on IntegriCloud