diff options
author | Jakob Unterwurzacher | 2016-06-15 23:30:44 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-15 23:30:44 +0200 |
commit | 6c3f97399a01a2d8480b39978209099335efbf7d (patch) | |
tree | 097b34a37b5f62ebcfd7294d096b16f436c180f9 /internal/nametransform/longnames.go | |
parent | 09e88f31d1b4308bf82c7f4eb0dd83855ad67ffc (diff) |
Rename internal "toggledlog" package to "tlog"
tlog is used heavily everywhere and deserves a shorter name.
Renamed using sed magic, without any manual rework:
find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
Diffstat (limited to 'internal/nametransform/longnames.go')
-rw-r--r-- | internal/nametransform/longnames.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/nametransform/longnames.go b/internal/nametransform/longnames.go index 0746cd6..13bedb3 100644 --- a/internal/nametransform/longnames.go +++ b/internal/nametransform/longnames.go @@ -9,7 +9,7 @@ import ( "strings" "syscall" - "github.com/rfjakob/gocryptfs/internal/toggledlog" + "github.com/rfjakob/gocryptfs/internal/tlog" ) const ( @@ -58,7 +58,7 @@ func IsLongContent(cName string) bool { func ReadLongName(path string) (string, error) { content, err := ioutil.ReadFile(path + LongNameSuffix) if err != nil { - toggledlog.Warn.Printf("ReadLongName: %v", err) + tlog.Warn.Printf("ReadLongName: %v", err) } return string(content), err } @@ -67,7 +67,7 @@ func ReadLongName(path string) (string, error) { func DeleteLongName(dirfd *os.File, hashName string) error { err := syscall.Unlinkat(int(dirfd.Fd()), hashName+LongNameSuffix) if err != nil { - toggledlog.Warn.Printf("DeleteLongName: %v", err) + tlog.Warn.Printf("DeleteLongName: %v", err) } return err } @@ -89,14 +89,14 @@ func (n *NameTransform) WriteLongName(dirfd *os.File, hashName string, plainName fdRaw, err := syscall.Openat(int(dirfd.Fd()), hashName+LongNameSuffix, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_EXCL, 0600) if err != nil { - toggledlog.Warn.Printf("WriteLongName: Openat: %v", err) + tlog.Warn.Printf("WriteLongName: Openat: %v", err) return err } fd := os.NewFile(uintptr(fdRaw), hashName+LongNameSuffix) defer fd.Close() _, err = fd.Write([]byte(cName)) if err != nil { - toggledlog.Warn.Printf("WriteLongName: Write: %v", err) + tlog.Warn.Printf("WriteLongName: Write: %v", err) } return err } |