summaryrefslogtreecommitdiffstats
path: root/sbin/gbde
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-02-23 06:35:33 +0000
committertjr <tjr@FreeBSD.org>2003-02-23 06:35:33 +0000
commit2702599ca0d83dc1569763a7ca8e6efb644bef2b (patch)
tree7e705881eee44eeeda9dd8bde0d71aaa53b0dbf1 /sbin/gbde
parent7e9d753cf392748f8a8371d64524b2c31dccb361 (diff)
downloadFreeBSD-src-2702599ca0d83dc1569763a7ca8e6efb644bef2b.zip
FreeBSD-src-2702599ca0d83dc1569763a7ca8e6efb644bef2b.tar.gz
Correct some err() format string bugs.
Diffstat (limited to 'sbin/gbde')
-rw-r--r--sbin/gbde/gbde.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/gbde/gbde.c b/sbin/gbde/gbde.c
index 05344d3..5fbab19 100644
--- a/sbin/gbde/gbde.c
+++ b/sbin/gbde/gbde.c
@@ -238,7 +238,7 @@ cmd_attach(const struct g_bde_softc *sc, const char *dest, const char *lfile)
if (lfile != NULL) {
ffd = open(lfile, O_RDONLY, 0);
if (ffd < 0)
- err(1, lfile);
+ err(1, "%s", lfile);
read(ffd, buf + sizeof(sc->sha2), 16);
close(ffd);
} else {
@@ -300,7 +300,7 @@ cmd_open(struct g_bde_softc *sc, int dfd , const char *l_opt, u_int *nkey)
if (l_opt != NULL) {
ffd = open(l_opt, O_RDONLY, 0);
if (ffd < 0)
- err(1, l_opt);
+ err(1, "%s", l_opt);
read(ffd, keyloc, sizeof keyloc);
close(ffd);
} else {
@@ -374,7 +374,7 @@ cmd_write(struct g_bde_key *gl, struct g_bde_softc *sc, int dfd , int key, const
if (l_opt != NULL) {
ffd = open(l_opt, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (ffd < 0)
- err(1, l_opt);
+ err(1, "%s", l_opt);
write(ffd, keyloc, sizeof keyloc);
close(ffd);
} else if (gl->flags & 1) {
@@ -476,7 +476,7 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char
if (f_opt != NULL) {
i = open(f_opt, O_RDONLY);
if (i < 0)
- err(1, f_opt);
+ err(1, "%s", f_opt);
params = properties_read(i);
close (i);
} else {
@@ -484,7 +484,7 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char
q = strdup("/tmp/temp.XXXXXXXXXX");
i = mkstemp(q);
if (i < 0)
- err(1, q);
+ err(1, "%s", q);
write(i, template, strlen(template));
close (i);
if (i_opt) {
@@ -496,7 +496,7 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char
}
i = open(q, O_RDONLY);
if (i < 0)
- err(1, f_opt);
+ err(1, "%s", f_opt);
params = properties_read(i);
close (i);
unlink(q);
@@ -753,7 +753,7 @@ main(int argc, char **argv)
dfd = open(buf, O_RDWR | O_CREAT, 0644);
}
if (dfd < 0)
- err(1, dest);
+ err(1, "%s", dest);
} else {
if (!memcmp(dest, _PATH_DEV, strlen(_PATH_DEV)))
strcpy(dest, dest + strlen(_PATH_DEV));
OpenPOWER on IntegriCloud