projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
706bc79
)
caller.py: implement write syscall
author
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 1 Dec 2023 07:29:18 +0000
(23:29 -0800)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 1 Dec 2023 20:42:15 +0000
(12:42 -0800)
src/openpower/decoder/isa/caller.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/isa/caller.py
b/src/openpower/decoder/isa/caller.py
index ae6ade0195b22d85e5a00eb8305e2a87606135f3..205ae88808ab7ecf7c23e89eeb35fdf1322cbb32 100644
(file)
--- a/
src/openpower/decoder/isa/caller.py
+++ b/
src/openpower/decoder/isa/caller.py
@@
-1166,6
+1166,13
@@
class SyscallEmulator(openpower.syscalls.Dispatcher):
self.__isacaller.halted = True
raise ExitSyscallCalled(status)
+ def sys_write(self, fd, buf, count, *rest):
+ buf = self.__isacaller.mem.get_ctypes(buf, count, is_write=False)
+ try:
+ return os.write(fd, buf)
+ except OSError as e:
+ return -e.errno
+
class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop):
# decoder2 - an instance of power_decoder2