summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/file.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-07-09 16:16:46 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-09 16:18:02 -0700
commitcceef9d2cfbf72a7ae4feac2e53e46179c33155d (patch)
treecefb01757e2363d09851f576a7a160bb2f4797e1 /pkg/abi/linux/file.go
parent6db3f8d54c0225e6b6c3d8eef30b4b61498848b7 (diff)
Cleanup straggling syscall dependencies.
PiperOrigin-RevId: 257293198
Diffstat (limited to 'pkg/abi/linux/file.go')
-rw-r--r--pkg/abi/linux/file.go43
1 files changed, 28 insertions, 15 deletions
diff --git a/pkg/abi/linux/file.go b/pkg/abi/linux/file.go
index 426003eb7..f78ffaa82 100644
--- a/pkg/abi/linux/file.go
+++ b/pkg/abi/linux/file.go
@@ -161,23 +161,36 @@ const (
// Stat represents struct stat.
type Stat struct {
- Dev uint64
- Ino uint64
- Nlink uint64
- Mode uint32
- UID uint32
- GID uint32
- X_pad0 int32
- Rdev uint64
- Size int64
- Blksize int64
- Blocks int64
- ATime Timespec
- MTime Timespec
- CTime Timespec
- X_unused [3]int64
+ Dev uint64
+ Ino uint64
+ Nlink uint64
+ Mode uint32
+ UID uint32
+ GID uint32
+ _ int32
+ Rdev uint64
+ Size int64
+ Blksize int64
+ Blocks int64
+ ATime Timespec
+ MTime Timespec
+ CTime Timespec
+ _ [3]int64
}
+// File types.
+const (
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+)
+
// SizeOfStat is the size of a Stat struct.
var SizeOfStat = binary.Size(Stat{})