tRemove 'open' from error messages - safe - password protected secret keeper
(HTM) git clone git://git.z3bra.org/safe.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit fc05dcf4f8bcdcbb199a7a9d9a98e35852ad135e
(DIR) parent df835567ad72b5aeafbe36f3231a956c38bd5a81
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Mon, 3 Jun 2019 12:24:42 +0200
Remove 'open' from error messages
Diffstat:
M safe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/safe.c b/safe.c
t@@ -201,7 +201,7 @@ deriv(char *pw, struct safe *s)
s->salt, crypto_pwhash_OPSLIMIT_INTERACTIVE,
crypto_pwhash_MEMLIMIT_INTERACTIVE,
crypto_pwhash_ALG_DEFAULT))
- err(1, "crypto_pwhash");
+ err(1, "crypto_pwhash:");
}
int
t@@ -306,7 +306,7 @@ store_secret(struct safe *s, int fd, char *name)
mkdir_p(dirname(name), 0700);
sfd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (sfd < 0)
- err(1, "open %s", name);
+ err(1, "%s", name);
xwrite(sfd, s->salt, sizeof(s->salt));
t@@ -342,7 +342,7 @@ show_secret(struct safe *s, int fd, char *name)
sfd = open(name, O_RDONLY);
if (sfd < 0)
- err(1, "open %s", name);
+ err(1, "%s", name);
xread(sfd, s->salt, sizeof(s->salt), NULL);
xread(sfd, s->h, sizeof(s->h), NULL);