summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-01 20:07:43 +0200
committerJakob Unterwurzacher2016-06-01 20:07:43 +0200
commit80b027f830ba5d9e5bf2514462208fcea573c388 (patch)
tree4970262b65463c48c355a91fb865c63d9afde531 /internal
parent4c5365d1614bce6a67404f1abaa6a4efa23c39b6 (diff)
nametransform, main: better error messages
Diffstat (limited to 'internal')
-rw-r--r--internal/nametransform/names_diriv.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/nametransform/names_diriv.go b/internal/nametransform/names_diriv.go
index 1beda3f..f5aa88d 100644
--- a/internal/nametransform/names_diriv.go
+++ b/internal/nametransform/names_diriv.go
@@ -37,7 +37,8 @@ func ReadDirIV(dir string) (iv []byte, err error) {
func ReadDirIVAt(dirfd *os.File) (iv []byte, err error) {
fdRaw, err := syscall.Openat(int(dirfd.Fd()), DirIVFilename, syscall.O_RDONLY, 0)
if err != nil {
- toggledlog.Warn.Printf("ReadDirIVAt: %v", err)
+ toggledlog.Warn.Printf("ReadDirIVAt: opening %q in dir %q failed: %v",
+ DirIVFilename, dirfd.Name(), err)
return nil, err
}
fd := os.NewFile(uintptr(fdRaw), DirIVFilename)
@@ -46,7 +47,7 @@ func ReadDirIVAt(dirfd *os.File) (iv []byte, err error) {
iv = make([]byte, dirIVLen+1)
n, err := fd.Read(iv)
if err != nil {
- toggledlog.Warn.Printf("ReadDirIVAt: %v", err)
+ toggledlog.Warn.Printf("ReadDirIVAt: Read failed: %v", err)
return nil, err
}
iv = iv[0:n]