Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use BPF_FS_MAGIC from go sys lib instead of hard code
This also avoids overflow during conversion. 0xCAFE4A11 is bigger than the max of int32, so doing int32(uint32(0xCAFE4A11)) (will not compile directly unless done over two lines) will result in -0x3501b5ef. Due to some strange errors[0] in the types in "unix.Statfs_t" for 32 bits systems, we have to explicitly convert to uint to support those (eg. armv7). If we only need support for 64 bit systems, we can remove the uint conversion as well. [0]: For 32bits systems "fsdata.Type" should be uint32 instead of the current int32, as it is in the linux kernel. This is due to the types in glibc that the go types are generated from. For 64 bit systems the type is correctly set to int64.
- Loading branch information