add zfs magic for GetFSType (#2950)

This commit is contained in:
blotus 2024-04-25 15:05:11 +02:00 committed by GitHub
parent 845d4542bb
commit ceb4479ec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ package types
import ( import (
"fmt" "fmt"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
) )
@ -92,6 +93,7 @@ var fsTypeMapping map[int64]string = map[int64]string{
0xabba1974: "xenfs", 0xabba1974: "xenfs",
0x012ff7b4: "xenix", 0x012ff7b4: "xenix",
0x58465342: "xfs", 0x58465342: "xfs",
0x2fc12fc1: "zfs",
} }
func GetFSType(path string) (string, error) { func GetFSType(path string) (string, error) {