summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/nametransform/names_diriv.go5
-rw-r--r--main.go2
2 files changed, 4 insertions, 3 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]
diff --git a/main.go b/main.go
index 83bd8d7..3f89368 100644
--- a/main.go
+++ b/main.go
@@ -101,7 +101,7 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf
// Check if the file exists at all before prompting for a password
_, err := os.Stat(args.config)
if err != nil {
- fmt.Println(err)
+ fmt.Printf(colorRed+"Config file not found: %v\n"+colorReset, err)
os.Exit(ERREXIT_LOADCONF)
}
if args.extpass == "" {