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:
3d14be2
)
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 09:29:58 +0000
(
01:29
-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 53412e99802b256538a424419d118be7816eacf6..e48b714898a428b1d802731a345896385eaf9f47 100644
(file)
--- a/
src/openpower/decoder/isa/caller.py
+++ b/
src/openpower/decoder/isa/caller.py
@@
-1163,6
+1163,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