Commit d7570e24 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: move Flags2 handling to platform specific code

Document why some bits are platform dependent.

Change-Id: Ib8bde502a3450028f4d87ba61fa9c76ea3ea6c63
parent 334a5a5f
......@@ -299,6 +299,7 @@ const (
CAP_MAX_PAGES = (1 << 22)
CAP_CACHE_SYMLINKS = (1 << 23)
/* bits 24..31 differ across linux and mac */
/* bits 32..63 get shifted down 32 bits into the Flags2 field */
CAP_SECURITY_CTX = (1 << 32)
CAP_HAS_INODE_DAX = (1 << 33)
......@@ -337,11 +338,6 @@ type InitOut struct {
Unused [6]uint32
}
func (o *InitOut) setFlags(flags uint64) {
o.Flags = uint32(flags)
o.Flags2 = uint32(flags >> 32)
}
type _CuseInitIn struct {
InHeader
Major uint32
......
......@@ -125,3 +125,7 @@ func (s *StatfsOut) FromStatfsT(statfs *syscall.Statfs_t) {
s.Bavail /= adj
}
}
func (o *InitOut) setFlags(flags uint64) {
o.Flags = uint32(flags)
}
......@@ -45,3 +45,8 @@ func (s *StatfsOut) FromStatfsT(statfs *syscall.Statfs_t) {
s.Frsize = uint32(statfs.Frsize)
s.NameLen = uint32(statfs.Namelen)
}
func (o *InitOut) setFlags(flags uint64) {
o.Flags = uint32(flags) | CAP_INIT_EXT
o.Flags2 = uint32(flags >> 32)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment