diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -39,37 +39,27 @@ main(int argc, char *argv[]) } /* Initialize outer archive. */ - opk = opkg_opk_opk_init_outer(argv[1]); + opk = opkg_opk_opk_init(argv[1]); if (opk == NULL) { goto error0; } /* Read control file. */ - if (opkg_opk_opk_init_inner(opk, "control.tar.gz") != OPKG_OPK_OK) { - goto error1; - } if (opkg_opk_opk_read_control(opk, control_files) != OPKG_OPK_OK) { - goto error2; + goto error1; } - opkg_opk_opk_free_inner(opk); /* List data files. */ - if (opkg_opk_opk_init_inner(opk, "data.tar.gz") != OPKG_OPK_OK) { - goto error1; - } if (opkg_opk_opk_list_members(opk) != OPKG_OPK_OK) { - goto error2; + goto error1; } - opkg_opk_opk_free_inner(opk); - opkg_opk_opk_free_outer(opk); + opkg_opk_opk_free(opk); opkg_opk_ustar_free_seek_names(control_files); return EXIT_SUCCESS; - error2: - opkg_opk_opk_free_inner(opk); error1: - opkg_opk_opk_free_outer(opk); + opkg_opk_opk_free(opk); error0: opkg_opk_ustar_free_seek_names(control_files); return EXIT_FAILURE; |