summaryrefslogtreecommitdiff
path: root/frontend/fe_file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-09-05 20:36:26 +0200
committerJakob Unterwurzacher2015-09-05 20:36:26 +0200
commitd0524ded993f870c2dd8a559efed0d612e85d588 (patch)
treed6bd42b690eb5642378b7cf3404b6889541fe183 /frontend/fe_file.go
parent11fb037e7e7d84405b3bed9de2aa500e49d9502d (diff)
Use Debug object instead of fmt
Diffstat (limited to 'frontend/fe_file.go')
-rw-r--r--frontend/fe_file.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/frontend/fe_file.go b/frontend/fe_file.go
index 4bd623f..7cc23ad 100644
--- a/frontend/fe_file.go
+++ b/frontend/fe_file.go
@@ -22,7 +22,7 @@ import (
)
func fixFlags(flags fuse.OpenFlags) (fuse.OpenFlags, bool) {
- fmt.Printf("fixFlags: Before: %s\n", flags.String())
+ cryptfs.Debug.Printf("fixFlags: Before: %s\n", flags.String())
var writeOnly bool
// We always need read access to do read-modify-write cycles
if flags & fuse.OpenWriteOnly > 0 {
@@ -32,7 +32,7 @@ func fixFlags(flags fuse.OpenFlags) (fuse.OpenFlags, bool) {
}
// We also cannot open the file in append mode, we need to seek back for RMW
flags = flags &^ fuse.OpenAppend
- fmt.Printf("fixFlags: After: %s\n", flags.String())
+ cryptfs.Debug.Printf("fixFlags: After: %s\n", flags.String())
return flags, writeOnly
}
@@ -51,7 +51,7 @@ type File struct {
}
func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fusefs.Handle, error) {
- fmt.Printf("File.Open\n")
+ cryptfs.Debug.Printf("File.Open\n")
req.Flags, f.writeOnly = fixFlags(req.Flags)
@@ -91,7 +91,7 @@ func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadR
}
func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error {
- fmt.Printf("File.Write\n")
+ cryptfs.Debug.Printf("File.Write\n")
resp.Size = 0
iblocks := f.crfs.SplitRange(uint64(req.Offset), uint64(len(req.Data)))
var blockData []byte
@@ -134,7 +134,7 @@ func (f *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.Wri
}
func (f *File) Attr(ctx context.Context, attr *fuse.Attr) error {
- fmt.Printf("Attr\n")
+ cryptfs.Debug.Printf("Attr\n")
err := f.File.Node.Attr(ctx, attr)
if err != nil {
return err