diff options
author | gavin <gavin@FreeBSD.org> | 2014-07-16 00:12:57 +0000 |
---|---|---|
committer | gavin <gavin@FreeBSD.org> | 2014-07-16 00:12:57 +0000 |
commit | 7a4991b9439dc80184ccaa530425275469eb9fdb (patch) | |
tree | 0c9fe9286eec5512440280cafe6ead0fcaa684d8 /usr.sbin/pkg | |
parent | 7da6d95166c02118f3aa4c890ea2e23a306f31fb (diff) | |
download | FreeBSD-src-7a4991b9439dc80184ccaa530425275469eb9fdb.zip FreeBSD-src-7a4991b9439dc80184ccaa530425275469eb9fdb.tar.gz |
When we fail to extract the pkg binaries (for example, / is read-only),
give a more helpful error message.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/pkg')
-rw-r--r-- | usr.sbin/pkg/pkg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 1b1a01c..8f26c61 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); |