unix: augment support for zos/s390x

This augments sys/unix support for zos/s390x by
adding a small number of syscalls:
Errno2
Err2ad
W_Getmntent_A (pure ascii version of W_Getmntent)
Select

It also makes Mount and Unmount more Linux-like.
A few necessary constants and types are added,
and some tests.

These changes do not affect other platforms in any way.

Fixes golang/go#45838

Change-Id: I5783784a79b6c80a47cca74f3352bc07ea4ca682
Reviewed-on: https://go-review.googlesource.com/c/sys/+/314950
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
This commit is contained in:
billofarrell
2021-05-02 18:08:10 +00:00
committed by Ian Lance Taylor
parent d19ff857e8
commit 71e4cd670f
7 changed files with 384 additions and 7 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ func TestMmap(t *testing.T) {
fmt.Fprintf(destination, "%s\n", "0 <- Flipped between 0 and 1 when test runs successfully")
fmt.Fprintf(destination, "%s\n", "//Do not change contents - mmap test relies on this")
destination.Close()
fd, err := unix.Open(filename, unix.O_RDWR, 0o777)
fd, err := unix.Open(filename, unix.O_RDWR, 0777)
if err != nil {
t.Fatalf("Open: %v", err)
}