diff options
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/fe_file.go | 2 | ||||
-rw-r--r-- | frontend/fe_fs.go | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/frontend/fe_file.go b/frontend/fe_file.go index b417227..4679589 100644 --- a/frontend/fe_file.go +++ b/frontend/fe_file.go @@ -68,7 +68,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error { - fmt.Printf("Read: o=%d l=%d\n", req.Offset, req.Size) + cryptfs.Debug.Printf("Read: o=%d l=%d\n", req.Offset, req.Size) // Read the backing ciphertext in one go iblocks := f.crfs.SplitRange(uint64(req.Offset), uint64(req.Size)) diff --git a/frontend/fe_fs.go b/frontend/fe_fs.go index 4d49194..d1fa5b1 100644 --- a/frontend/fe_fs.go +++ b/frontend/fe_fs.go @@ -27,17 +27,17 @@ type nullTracer struct {} func (nullTracer) Trace(op cluefs.FsOperTracer) {} -func NewFS(key [16]byte, backing string, useOpenssl bool) *FS { - var nt nullTracer - clfs, err := cluefs.NewClueFS(backing, nt) +func NewFS(key [16]byte, backing string, useOpenssl bool) (*FS, error) { + var tracer nullTracer + clfs, err := cluefs.NewClueFS(backing, tracer) if err != nil { - panic(err) + return nil, err } return &FS { CryptFS: cryptfs.NewCryptFS(key, useOpenssl), ClueFS: clfs, backing: backing, - } + }, nil } func (fs *FS) Root() (fusefs.Node, error) { |