aboutsummaryrefslogtreecommitdiff
path: root/archival/dpkg.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-12-08 00:54:33 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-12-08 00:54:33 +0000
commitcf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77 (patch)
treef7e34d157460ad689c350071a25d19cdd51e1ebb /archival/dpkg.c
parent582df5509027f8cef2b76d3da3c105bb8af2b236 (diff)
downloadbusybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.tar.gz
busybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.tar.bz2
busybox-w32-cf8bf5cd0fc134b9b61e1fa2ffeb4d7aba31af77.zip
Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free).
git-svn-id: svn://busybox.net/trunk/busybox@6132 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival/dpkg.c')
-rw-r--r--archival/dpkg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 274d711dc..d3e652bc8 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1330,10 +1330,10 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
1330 1330
1331 /* We dont care about data.tar.* or debian-binary, just control.tar.* */ 1331 /* We dont care about data.tar.* or debian-binary, just control.tar.* */
1332#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1332#ifdef CONFIG_FEATURE_DEB_TAR_GZ
1333 ar_handle->accept = add_to_list(NULL, "control.tar.gz"); 1333 ar_handle->accept = llist_add_to(NULL, "control.tar.gz");
1334#endif 1334#endif
1335#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 1335#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
1336 ar_handle->accept = add_to_list(ar_handle->accept, "control.tar.bz2"); 1336 ar_handle->accept = llist_add_to(ar_handle->accept, "control.tar.bz2");
1337#endif 1337#endif
1338 1338
1339 /* Assign the tar handle as a subarchive of the ar handle */ 1339 /* Assign the tar handle as a subarchive of the ar handle */
@@ -1353,10 +1353,10 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
1353 1353
1354 /* We dont care about data.tar.* or debian-binary, just control.tar.* */ 1354 /* We dont care about data.tar.* or debian-binary, just control.tar.* */
1355#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1355#ifdef CONFIG_FEATURE_DEB_TAR_GZ
1356 tar_handle->accept = add_to_list(NULL, "data.tar.gz"); 1356 tar_handle->accept = llist_add_to(NULL, "data.tar.gz");
1357#endif 1357#endif
1358#ifdef CONFIG_FEATURE_DEB_TAR_BZ2 1358#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
1359 tar_handle->accept = add_to_list(ar_handle->accept, "data.tar.bz2"); 1359 tar_handle->accept = llist_add_to(ar_handle->accept, "data.tar.bz2");
1360#endif 1360#endif
1361 1361
1362 /* Assign the tar handle as a subarchive of the ar handle */ 1362 /* Assign the tar handle as a subarchive of the ar handle */
@@ -1365,7 +1365,7 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
1365 return; 1365 return;
1366} 1366}
1367 1367
1368static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, const llist_t *accept) 1368static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *accept)
1369{ 1369{
1370 ar_handle->sub_archive->action_data = data_extract_to_buffer; 1370 ar_handle->sub_archive->action_data = data_extract_to_buffer;
1371 ar_handle->sub_archive->accept = accept; 1371 ar_handle->sub_archive->accept = accept;
@@ -1532,10 +1532,10 @@ int dpkg_main(int argc, char **argv)
1532 deb_file[deb_count] = (deb_file_t *) xmalloc(sizeof(deb_file_t)); 1532 deb_file[deb_count] = (deb_file_t *) xmalloc(sizeof(deb_file_t));
1533 if (dpkg_opt & dpkg_opt_filename) { 1533 if (dpkg_opt & dpkg_opt_filename) {
1534 archive_handle_t *archive_handle; 1534 archive_handle_t *archive_handle;
1535 const llist_t *control_list = NULL; 1535 llist_t *control_list = NULL;
1536 1536
1537 /* Extract the control file */ 1537 /* Extract the control file */
1538 control_list = add_to_list(NULL, "./control"); 1538 control_list = llist_add_to(NULL, "./control");
1539 archive_handle = init_archive_deb_ar(argv[optind]); 1539 archive_handle = init_archive_deb_ar(argv[optind]);
1540 init_archive_deb_control(archive_handle); 1540 init_archive_deb_control(archive_handle);
1541 deb_file[deb_count]->control_file = deb_extract_control_file_to_buffer(archive_handle, control_list); 1541 deb_file[deb_count]->control_file = deb_extract_control_file_to_buffer(archive_handle, control_list);