|
|
@@ -15,18 +15,14 @@ import (
|
|
|
"golang.org/x/sys/unix"
|
|
|
)
|
|
|
|
|
|
-const MNT_WAIT = 1
|
|
|
-const MNT_NOWAIT = 2
|
|
|
-
|
|
|
func TestGetfsstat(t *testing.T) {
|
|
|
- const flags = MNT_NOWAIT // see golang.org/issue/16937
|
|
|
- n, err := unix.Getfsstat(nil, flags)
|
|
|
+ n, err := unix.Getfsstat(nil, unix.MNT_NOWAIT)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
|
|
|
|
data := make([]unix.Statfs_t, n)
|
|
|
- n2, err := unix.Getfsstat(data, flags)
|
|
|
+ n2, err := unix.Getfsstat(data, unix.MNT_NOWAIT)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|