aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Atkinson <gavin@FreeBSD.org>2014-07-16 00:12:57 +0000
committerGavin Atkinson <gavin@FreeBSD.org>2014-07-16 00:12:57 +0000
commit4622bc4e31f19430847e9e8aa96371d9fe4961ee (patch)
tree0c9fe9286eec5512440280cafe6ead0fcaa684d8
parenta11d2109867c4a4c4c22f216b82dbe9aa5f6a9d5 (diff)
downloadsrc-4622bc4e31f19430847e9e8aa96371d9fe4961ee.tar.gz
src-4622bc4e31f19430847e9e8aa96371d9fe4961ee.zip
When we fail to extract the pkg binaries (for example, / is read-only),
give a more helpful error message. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=268728
-rw-r--r--usr.sbin/pkg/pkg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index 1b1a01cf60eb..8f26c611e016 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -126,7 +126,8 @@ extract_pkg_static(int fd, char *p, int sz)
if (r == ARCHIVE_OK)
ret = 0;
else
- warnx("fail to extract pkg-static");
+ warnx("failed to extract pkg-static: %s",
+ archive_error_string(a));
cleanup:
archive_read_free(a);