Commit 116a24d5 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Remove unused imports.

parent 22637a49
......@@ -6,9 +6,7 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"runtime"
"time"
"github.com/hanwen/go-fuse/fuse"
......@@ -16,9 +14,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = runtime.GOMAXPROCS
var _ = log.Print
func main() {
// Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "print debugging messages.")
......
......@@ -3,7 +3,6 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"path/filepath"
......@@ -12,8 +11,6 @@ import (
"github.com/hanwen/go-fuse/zipfs"
)
var _ = log.Printf
func main() {
// Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "debug on")
......
......@@ -15,8 +15,6 @@ import (
"time"
)
var _ = log.Printf
func main() {
// Scans the arg list and sets up flags
debug := flag.Bool("debug", false, "print debugging messages.")
......
package fuse
import (
"fmt"
"testing"
)
var _ = fmt.Println
func TestBufferPool(t *testing.T) {
bp := NewBufferPool()
......
......@@ -9,8 +9,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
)
var _ = fmt.Println
// DataFile is for implementing read-only filesystems. This
// assumes we already have the data in memory.
type dataFile struct {
......@@ -108,8 +106,6 @@ type loopbackFile struct {
lock sync.Mutex
}
var _ = (File)((*loopbackFile)(nil))
func (f *loopbackFile) InnerFile() File {
return nil
}
......@@ -217,8 +213,6 @@ type readOnlyFile struct {
File
}
var _ = (File)((*readOnlyFile)(nil))
func (f *readOnlyFile) String() string {
return fmt.Sprintf("readOnlyFile(%s)", f.File.String())
}
......
......@@ -8,8 +8,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
)
var _ = log.Println
// openedFile stores either an open dir or an open file.
type openedFile struct {
handled
......
......@@ -13,8 +13,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
)
var _ = log.Println
// Returns the RawFileSystem so it can be mounted.
func (c *FileSystemConnector) RawFS() fuse.RawFileSystem {
return (*rawBridge)(c)
......
package nodefs
import (
"log"
"strings"
"testing"
"unsafe"
)
var _ = log.Println
func markSeen(t *testing.T, substr string) {
if r := recover(); r != nil {
s := r.(string)
......
......@@ -2,7 +2,6 @@ package nodefs
import (
"io/ioutil"
"log"
"os"
"testing"
"time"
......@@ -10,8 +9,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
)
var _ = log.Println
const testTtl = 100 * time.Millisecond
func setupMemNodeTest(t *testing.T) (wd string, fs FileSystem, clean func()) {
......
......@@ -2,15 +2,11 @@ package fuse
import (
"bytes"
"fmt"
"log"
"reflect"
"unsafe"
)
var _ = log.Printf
var _ = fmt.Printf
const (
_OP_LOOKUP = int32(1)
_OP_FORGET = int32(2)
......
package pathfs
import (
"fmt"
"io"
"log"
"os"
......@@ -13,9 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
var _ = fmt.Println
var _ = log.Println
type loopbackFileSystem struct {
// TODO - this should need default fill in.
FileSystem
......@@ -61,8 +57,6 @@ func (fs *loopbackFileSystem) GetAttr(name string, context *fuse.Context) (a *fu
return a, fuse.OK
}
var _ = (FileSystem)((*loopbackFileSystem)(nil))
func (fs *loopbackFileSystem) OpenDir(name string, context *fuse.Context) (stream []fuse.DirEntry, status fuse.Status) {
// What other ways beyond O_RDONLY are there to open
// directories?
......
......@@ -12,8 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
var _ = log.Println
// A parent pointer: node should be reachable as parent.children[name]
type clientInodePath struct {
parent *pathInode
......
......@@ -18,8 +18,6 @@ type readonlyFileSystem struct {
FileSystem
}
var _ = (FileSystem)((*readonlyFileSystem)(nil))
func (fs *readonlyFileSystem) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
return fs.FileSystem.GetAttr(name, context)
}
......
......@@ -3,7 +3,6 @@ package pathfs
import (
"bytes"
"io/ioutil"
"log"
"os"
"path/filepath"
"syscall"
......@@ -13,8 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
var _ = log.Print
var xattrGolden = map[string][]byte{
"user.attr1": []byte("val1"),
"user.attr2": []byte("val2")}
......
......@@ -10,7 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
)
type cacheFs struct {
......@@ -24,7 +23,7 @@ func (fs *cacheFs) Open(name string, flags uint32, context *fuse.Context) (fuseF
}
return &nodefs.WithFlags{
File: f,
FuseFlags: raw.FOPEN_KEEP_CACHE,
FuseFlags: fuse.FOPEN_KEEP_CACHE,
}, c
}
......@@ -127,7 +126,7 @@ func (fs *nonseekFs) Open(name string, flags uint32, context *fuse.Context) (fus
f := nodefs.NewDataFile(data)
return &nodefs.WithFlags{
File: f,
FuseFlags: raw.FOPEN_NONSEEKABLE,
FuseFlags: fuse.FOPEN_NONSEEKABLE,
}, fuse.OK
}
......
......@@ -10,7 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/raw"
)
type MutableDataFile struct {
......@@ -149,7 +148,7 @@ func setupFAttrTest(t *testing.T, fs pathfs.FileSystem) (dir string, clean func(
// Trigger INIT.
os.Lstat(dir)
if state.KernelSettings().Flags&raw.CAP_FILE_OPS == 0 {
if state.KernelSettings().Flags&fuse.CAP_FILE_OPS == 0 {
t.Log("Mount does not support file operations")
}
......
......@@ -4,13 +4,11 @@ import (
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"syscall"
"testing"
"time"
......@@ -20,12 +18,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = strings.Join
var _ = log.Println
////////////////
// state for our testcase, mostly constants
const mode uint32 = 0757
type testCase struct {
......
......@@ -10,8 +10,6 @@ import (
"syscall"
)
var _ = log.Println
var maxPipeSize int
var resizable bool
......
package unionfs
import (
"fmt"
"io/ioutil"
"log"
"os"
......@@ -13,9 +12,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = fmt.Print
var _ = log.Print
const entryTtl = 100 * time.Millisecond
var testAOpts = AutoUnionFsOptions{
......
......@@ -11,8 +11,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = fmt.Println
const _XATTRSEP = "@XATTR@"
type attrResponse struct {
......
package unionfs
import (
"fmt"
"io/ioutil"
"log"
"os"
"syscall"
"testing"
......@@ -12,9 +10,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = fmt.Print
var _ = log.Print
func modeMapEq(m1, m2 map[string]uint32) bool {
if len(m1) != len(m2) {
return false
......
package unionfs
import (
"log"
"sync"
"time"
)
var _ = log.Println
type cacheEntry struct {
data interface{}
......
package unionfs
import (
"fmt"
"log"
"testing"
"time"
)
var _ = fmt.Print
var _ = log.Print
func TestTimedCacheUncacheable(t *testing.T) {
fetchCount := 0
fetch := func(n string) (interface{}, bool) {
......
......@@ -20,9 +20,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = fmt.Print
var _ = log.Print
func TestFilePathHash(t *testing.T) {
// Simple test coverage.
t.Log(filePathHash("xyz/abc"))
......
......@@ -19,9 +19,6 @@ import (
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var _ = log.Printf
var _ = (pathfs.FileSystem)((*MultiZipFs)(nil))
const (
CONFIG_PREFIX = "config/"
)
......
......@@ -5,7 +5,6 @@ import (
"bytes"
"compress/bzip2"
"compress/gzip"
"fmt"
"github.com/hanwen/go-fuse/fuse"
"io"
"os"
......@@ -13,8 +12,6 @@ import (
"syscall"
)
var _ = fmt.Println
// TODO - handle symlinks.
func HeaderToFileInfo(out *fuse.Attr, h *tar.Header) {
......
......@@ -7,14 +7,11 @@ import (
"fmt"
"github.com/hanwen/go-fuse/fuse"
"io"
"log"
"os"
"path/filepath"
"strings"
)
var _ = log.Printf
type ZipFile struct {
*zip.File
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment