summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index f713645..14c586f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,8 +97,6 @@ _opkg_opk_main_extract(const char *file_name, const char *outer_member,
}
if (inner_action(inner_ustar) != OPKG_OPK_OK) {
- fprintf(stderr, "Error: Failed to read \"%s\" in archive\n",
- outer_member);
goto error5;
}
@@ -130,12 +128,16 @@ _opkg_opk_main_read_control(struct opkg_opk_ustar *ustar)
size_t size;
int ret;
- opkg_opk_ustar_seek(ustar, "control");
+ if (opkg_opk_ustar_seek(ustar, "control") != OPKG_OPK_OK) {
+ fputs("Error: Failed to find control file\n", stderr);
+ return OPKG_OPK_ERROR;
+ }
while ((ret = opkg_opk_ustar_read(ustar, &buffer, &size)) ==
OPKG_OPK_OK) {
fwrite(buffer, 1, size, stdout);
}
if (ret == OPKG_OPK_ERROR) {
+ fputs("Error: Failed to read control file\n", stderr);
return OPKG_OPK_ERROR;
}
@@ -152,6 +154,7 @@ _opkg_opk_main_list_members(struct opkg_opk_ustar *ustar)
puts(member.name);
}
if (ret == OPKG_OPK_ERROR) {
+ fputs("Error: Failed to list data files\n", stderr);
return OPKG_OPK_ERROR;
}