mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
15 lines
248 B
Go
15 lines
248 B
Go
|
package graphdriver
|
||
|
|
||
|
import (
|
||
|
"path"
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func GetFSMagic(rootpath string) (FsMagic, error) {
|
||
|
var buf syscall.Statfs_t
|
||
|
if err := syscall.Statfs(path.Dir(rootpath), &buf); err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
return FsMagic(buf.Type), nil
|
||
|
}
|