1// +build darwin 2// +build amd64 3 4package disk 5 6const ( 7 MntWait = 1 8 MfsNameLen = 15 /* length of fs type name, not inc. nul */ 9 MNameLen = 90 /* length of buffer for returned name */ 10 11 MFSTYPENAMELEN = 16 /* length of fs type name including null */ 12 MAXPATHLEN = 1024 13 MNAMELEN = MAXPATHLEN 14 15 SYS_GETFSSTAT64 = 347 16) 17 18type Fsid struct{ val [2]int32 } /* file system id type */ 19type uid_t int32 20 21// sys/mount.h 22const ( 23 MntReadOnly = 0x00000001 /* read only filesystem */ 24 MntSynchronous = 0x00000002 /* filesystem written synchronously */ 25 MntNoExec = 0x00000004 /* can't exec from filesystem */ 26 MntNoSuid = 0x00000008 /* don't honor setuid bits on fs */ 27 MntUnion = 0x00000020 /* union with underlying filesystem */ 28 MntAsync = 0x00000040 /* filesystem written asynchronously */ 29 MntSuidDir = 0x00100000 /* special handling of SUID on dirs */ 30 MntSoftDep = 0x00200000 /* soft updates being done */ 31 MntNoSymFollow = 0x00400000 /* do not follow symlinks */ 32 MntGEOMJournal = 0x02000000 /* GEOM journal support enabled */ 33 MntMultilabel = 0x04000000 /* MAC support for individual objects */ 34 MntACLs = 0x08000000 /* ACL support enabled */ 35 MntNoATime = 0x10000000 /* disable update of file access time */ 36 MntClusterRead = 0x40000000 /* disable cluster read */ 37 MntClusterWrite = 0x80000000 /* disable cluster write */ 38 MntNFS4ACLs = 0x00000010 39) 40 41type Statfs struct { 42 Bsize uint32 43 Iosize int32 44 Blocks uint64 45 Bfree uint64 46 Bavail uint64 47 Files uint64 48 Ffree uint64 49 Fsid Fsid 50 Owner uint32 51 Type uint32 52 Flags uint32 53 Fssubtype uint32 54 Fstypename [16]int8 55 Mntonname [1024]int8 56 Mntfromname [1024]int8 57 Reserved [8]uint32 58} 59