aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ktrace
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-07-10 09:14:15 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-07-10 09:14:15 +0000
commit0c4d24a78fbd9f937393e4fdf3bbb07c9b762c03 (patch)
tree451f5c7e1d53bb95d09c13614134d6f2b899f8d1 /usr.bin/ktrace
parent3d3f014fd4fa86c84994b6c2b0cd81a3575f1bab (diff)
Notes
Diffstat (limited to 'usr.bin/ktrace')
-rw-r--r--usr.bin/ktrace/ktrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c
index 1c5a98ba67962..48d4871a210b4 100644
--- a/usr.bin/ktrace/ktrace.c
+++ b/usr.bin/ktrace/ktrace.c
@@ -136,14 +136,14 @@ main(argc, argv)
ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE;
if (ktrace(tracefile, ops, trpoints, pid) < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
exit(0);
}
omask = umask(S_IRWXG|S_IRWXO);
if (append) {
if ((fd = open(tracefile, O_CREAT | O_WRONLY, DEFFILEMODE)) < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
if (fstat(fd, &sb) != 0 || sb.st_uid != getuid())
errx(1, "Refuse to append to %s not owned by you.",
tracefile);
@@ -152,19 +152,19 @@ main(argc, argv)
err(1, "unlink %s", tracefile);
if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY,
DEFFILEMODE)) < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
}
(void)umask(omask);
(void)close(fd);
if (*argv) {
if (ktrace(tracefile, ops, trpoints, getpid()) < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
execvp(argv[0], &argv[0]);
err(1, "exec of '%s' failed", argv[0]);
}
else if (ktrace(tracefile, ops, trpoints, pid) < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
exit(0);
}