Skip to content

Commit 495eb3f

Browse files
tklauserbradfitz
authored andcommitted
syscall: remove/update outdated TODO comments
Error returns for linux/arm syscalls are handled since a long time. Remove another list of unimplemented syscalls, following CL 96315. The root-only check in TestSyscallNoError was shown to be sufficient as part of CL 84485 already. NetBSD and OpenBSD do not implement the sendfile syscall (yet), so add a link to golang.org/issue/5847 Change-Id: I07efc3c3203537a4142707385f31b59dc0ecca42 Reviewed-on: https://go-review.googlesource.com/97115 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent ad9814d commit 495eb3f

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

src/syscall/asm_linux_arm.s

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// System calls for arm, Linux
1010
//
1111

12-
// TODO(kaib): handle error returns
13-
1412
// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr);
1513
TEXT ·Syscall(SB),NOSPLIT,$0-28
1614
BL runtime·entersyscall(SB)

src/syscall/syscall_bsd.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,6 @@ func Futimes(fd int, tv []Timeval) (err error) {
539539

540540
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
541541

542-
// TODO: wrap
543-
// Acct(name nil-string) (err error)
544-
// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
545-
// Madvise(addr *byte, len int, behav int) (err error)
546-
// Mprotect(addr *byte, len int, prot int) (err error)
547-
// Msync(addr *byte, len int, flags int) (err error)
548-
// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
549-
550542
var mapper = &mmapper{
551543
active: make(map[*byte][]byte),
552544
mmap: mmap,

src/syscall/syscall_linux_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ func TestSyscallNoError(t *testing.T) {
180180
t.Skip("skipping on non-32bit architecture")
181181
}
182182

183-
// TODO(tklauser) is this check enough? Otherwise test for being in a non-k8s
184-
// Linux VM via testenv.Builder().
185183
if os.Getuid() != 0 {
186184
t.Skip("skipping root only test")
187185
}

src/syscall/syscall_netbsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
142142
return getdents(fd, buf)
143143
}
144144

145-
// TODO
145+
// TODO, see golang.org/issue/5847
146146
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
147147
return -1, ENOSYS
148148
}

src/syscall/syscall_openbsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
9898
return getdents(fd, buf)
9999
}
100100

101-
// TODO
101+
// TODO, see golang.org/issue/5847
102102
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
103103
return -1, ENOSYS
104104
}

0 commit comments

Comments
 (0)