Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox 9a76102bfb all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
2021-02-20 05:07:31 +00:00
smasher164 cbf593c0f2 unix: remove nacl build tag from dirent code
Although CL 128110043 had deleted nacl from x/sys/unix, CL 38758
accidentially introduced its build tag in dirent.go when copying
over stdlib syscall code, which this CL removes.

Fixes golang/go#33391.

Change-Id: Iad6fe9818e38f14548eecdc078392865a60e4685
Reviewed-on: https://go-review.googlesource.com/c/sys/+/188361
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-08-01 04:14:06 +00:00
Tobias Klauser e07cf5db27 unix: don't use syscall.ParseDirent
Implement ParseDirent in x/sys/unix instead of calling
syscall.ParseDirent. The latter uses offsets into syscall.Dirent which
might not be matching unix.Dirent depending on Go version. This is e.g.
the case with of FreeBSD whose Dirent structure was updated for Go 1.12.

This fixes TestDirent and TestGetdirentries on freebsd with Go 1.11

Reverts CL 88475

Change-Id: I04318f59c6fbf148c75ce3667255a0c0428288e2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/183897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
2019-06-26 15:08:13 +00:00
Tony Reix d99a578cf4 unix: code for AIX ppc and ppc64, for gccgo
Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-08-28 06:51:06 +00:00
Tobias Klauser af50095a40 unix: use ParseDirent from syscall
Just call syscall's implementation instead of duplicating ParseDirent
and the GOOS-specific private functions needed by it.

Change-Id: Icf49769390929463323608e093dd2a3d1c0ae4d3
Reviewed-on: https://go-review.googlesource.com/88475
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-22 08:19:59 +00:00
Koki Ide 9a7256cb28 unix: validate ParseDirent inputs
This is a copy of https://golang.org/cl/23780 for the x/sys repo.

Don't panic, crash, or return references to uninitialized memory when 
ParseDirent is passed invalid input.

Updates golang/go#15653
Fixes golang/go#19754

Change-Id: Idb7cffe14d48ed662e5a55ecb5249c1907cf4003
Reviewed-on: https://go-review.googlesource.com/38758
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-29 06:16:34 +00:00