Add missing OpenBSD mount option strings

Add missing mount option string decoding according to the OpenBSD
mount(8) manpage: https://man.openbsd.org/mount
This commit is contained in:
Tobias Klauser 2019-12-23 13:42:44 +01:00
parent 10cdcee035
commit 4d6c82fb03
1 changed files with 9 additions and 0 deletions

View File

@ -51,6 +51,15 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
if stat.F_flags&unix.MNT_ASYNC != 0 { if stat.F_flags&unix.MNT_ASYNC != 0 {
opts += ",async" opts += ",async"
} }
if stat.F_flags&unix.MNT_SOFTDEP != 0 {
opts += ",softdep"
}
if stat.F_flags&unix.MNT_NOATIME != 0 {
opts += ",noatime"
}
if stat.F_flags&unix.MNT_WXALLOWED != 0 {
opts += ",wxallowed"
}
d := PartitionStat{ d := PartitionStat{
Device: common.IntToString(stat.F_mntfromname[:]), Device: common.IntToString(stat.F_mntfromname[:]),