diff options
author | pjd <pjd@FreeBSD.org> | 2006-01-30 23:00:48 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-01-30 23:00:48 +0000 |
commit | 6964e18a97c1313f6b1cb2adfd60260b97512ed6 (patch) | |
tree | 8f96219fbcaf54c7ee0643af212395c5c8c5d901 /usr.bin/mkuzip/mkuzip.c | |
parent | f9836a378dd449473e8e5a10774d2be75247f682 (diff) | |
download | FreeBSD-src-6964e18a97c1313f6b1cb2adfd60260b97512ed6.zip FreeBSD-src-6964e18a97c1313f6b1cb2adfd60260b97512ed6.tar.gz |
Tell the user exactly where the problem was.
Diffstat (limited to 'usr.bin/mkuzip/mkuzip.c')
-rw-r--r-- | usr.bin/mkuzip/mkuzip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mkuzip/mkuzip.c b/usr.bin/mkuzip/mkuzip.c index 2f770ff..4cad2fb 100644 --- a/usr.bin/mkuzip/mkuzip.c +++ b/usr.bin/mkuzip/mkuzip.c @@ -123,7 +123,7 @@ int main(int argc, char **argv) atexit(cleanup); if (stat(iname, &sb) != 0) { - err(1, "%s", iname); + err(1, "stat(%s)", iname); /* Not reached */ } hdr.nblocks = sb.st_size / hdr.blksz; @@ -137,13 +137,13 @@ int main(int argc, char **argv) fdr = open(iname, O_RDONLY); if (fdr < 0) { - err(1, "%s", iname); + err(1, "open(%s)", iname); /* Not reached */ } fdw = open(oname, O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (fdw < 0) { - err(1, "%s", oname); + err(1, "open(%s)", oname); /* Not reached */ } cleanfile = oname; @@ -185,7 +185,7 @@ int main(int argc, char **argv) DEV_BSIZE); } if (write(fdw, obuf, destlen) < 0) { - err(1, "%s", oname); + err(1, "write(%s)", oname); /* Not reached */ } toc[i] = htobe64(offset); @@ -204,7 +204,7 @@ int main(int argc, char **argv) /* Write headers into pre-allocated space */ lseek(fdw, 0, SEEK_SET); if (writev(fdw, iov, 2) < 0) { - err(1, "%s", oname); + err(1, "writev(%s)", oname); /* Not reached */ } cleanfile = NULL; |