(dir string)
| 830 | } |
| 831 | |
| 832 | func dirToBeFUSE(dir string) func() bool { |
| 833 | return func() bool { |
| 834 | //func Statfs(path string, buf *Statfs_t) (err error) |
| 835 | var st unix.Statfs_t |
| 836 | if err := unix.Statfs(dir, &st); err != nil { |
| 837 | log.Printf("Statfs: %v", err) |
| 838 | return false |
| 839 | } |
| 840 | log.Printf("Statsfs: %+v", st) |
| 841 | const FUSE_SUPER_MAGIC = 0x65735546 |
| 842 | return st.Type == FUSE_SUPER_MAGIC |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | // shortenString reduces any run of 5 or more identical bytes to "x{17}". |
| 847 | // "hello" => "hello" |
no test coverage detected