diff options
author | Keith Randall <khr@golang.org> | 2015-03-02 20:16:48 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2015-03-03 17:46:36 +0000 |
commit | f584c05fcc38fef1582681a7e2841b725f0a827d (patch) | |
tree | 5a96b88327f816c5e32b57090382df4b10793153 /src/runtime/sys_linux_ppc64x.s | |
parent | 74e88dfdeebef392d52d3f792e2071b058c1e231 (diff) | |
download | go-f584c05fcc38fef1582681a7e2841b725f0a827d.tar.gz go-f584c05fcc38fef1582681a7e2841b725f0a827d.zip |
runtime: Update open/close/read/write to return -1 on error.
Error detection code copied from syscall, where presumably
we actually do it right.
Note that we throw the errno away. The runtime doesn't use it.
Fixes #10052
Change-Id: I8de77dda6bf287276b137646c26b84fa61554ec8
Reviewed-on: https://go-review.googlesource.com/6571
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
-rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index 1f2a5af50a..3070893258 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -62,12 +62,16 @@ TEXT runtime·open(SB),NOSPLIT,$-8-20 MOVW mode+8(FP), R4 MOVW perm+12(FP), R5 SYSCALL $SYS_open + BVC 2(PC) + MOVW $-1, R3 MOVW R3, ret+16(FP) RETURN TEXT runtime·close(SB),NOSPLIT,$-8-12 MOVW fd+0(FP), R3 SYSCALL $SYS_close + BVC 2(PC) + MOVW $-1, R3 MOVW R3, ret+8(FP) RETURN @@ -76,6 +80,8 @@ TEXT runtime·write(SB),NOSPLIT,$-8-28 MOVD p+8(FP), R4 MOVW n+16(FP), R5 SYSCALL $SYS_write + BVC 2(PC) + MOVW $-1, R3 MOVW R3, ret+24(FP) RETURN @@ -84,6 +90,8 @@ TEXT runtime·read(SB),NOSPLIT,$-8-28 MOVD p+8(FP), R4 MOVW n+16(FP), R5 SYSCALL $SYS_read + BVC 2(PC) + MOVW $-1, R3 MOVW R3, ret+24(FP) RETURN |