unix: add statfs and filesystem magic constants on Linux

Fixes golang/go#25341

Change-Id: I79cb4c77b771e005eb27d4e495ac6a7491e2e66e
Reviewed-on: https://go-review.googlesource.com/112696
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser
2018-05-11 13:39:06 +00:00
committed by Brad Fitzpatrick
parent 7dfd1290c7
commit 9950ad118b
24 changed files with 1097 additions and 173 deletions
+17 -2
View File
@@ -38,6 +38,7 @@ package unix
#include <sys/select.h>
#include <sys/signal.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
#include <sys/sysinfo.h>
#include <sys/time.h>
#include <sys/times.h>
@@ -337,8 +338,6 @@ type _Gid_t C.gid_t
type Stat_t C.struct_stat
type Statfs_t C.struct_statfs
type StatxTimestamp C.struct_statx_timestamp
type Statx_t C.struct_statx
@@ -972,3 +971,19 @@ type HDDriveCmdHdr C.struct_hd_drive_cmd_hdr
type HDGeometry C.struct_hd_geometry
type HDDriveID C.struct_hd_driveid
// Statfs
type Statfs_t C.struct_statfs
const (
ST_MANDLOCK = C.ST_MANDLOCK
ST_NOATIME = C.ST_NOATIME
ST_NODEV = C.ST_NODEV
ST_NODIRATIME = C.ST_NODIRATIME
ST_NOEXEC = C.ST_NOEXEC
ST_NOSUID = C.ST_NOSUID
ST_RDONLY = C.ST_RDONLY
ST_RELATIME = C.ST_RELATIME
ST_SYNCHRONOUS = C.ST_SYNCHRONOUS
)