//go:build linux

package system

import "syscall"

// statfsFn is the syscall seam (tests inject fake f_types without real mounts).
var statfsFn = syscall.Statfs

// ClassifyPathFS classifies path by its filesystem magic in this process's mount namespace.
// UNBOUNDED — statfs on a mounted-but-dead network fs can block for the soft-timeout window;
// interactive callers use ClassifyPathFSTimeout. statfs error → FSClassUnknown.
func ClassifyPathFS(path string) string {
	var st syscall.Statfs_t
	if err := statfsFn(path, &st); err != nil {
		return FSClassUnknown
	}
	return classifyFSMagic(int64(st.Type))
}
