From 0b7a99e65bb95cd86d8846a21fce1cfc2b0b7495 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Sun, 14 Dec 2008 23:18:06 -0500 Subject: * Rename top level ipkg directory to opkg git-svn-id: http://opkg.googlecode.com/svn/trunk@8 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libbb') diff --git a/libbb/libbb.h b/libbb/libbb.h index c54038d..0385d55 100644 --- a/libbb/libbb.h +++ b/libbb/libbb.h @@ -27,7 +27,7 @@ #include -// Include because of single use with ipkg +// Include because of single use with opkg #define _BB_INTERNAL_H_ #define L_archive_offset #define L_get_header_ar diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 0946ded..2457824 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -762,23 +762,23 @@ char *deb_extract(const char *package_filename, FILE *out_stream, free(ared_file); return(output_buffer); } else if (strncmp(ar_magic, "\037\213", 2) == 0) { - /* it's a gz file, let's assume it's an ipkg */ - int unzipped_ipkg_pid; - FILE *unzipped_ipkg_stream; + /* it's a gz file, let's assume it's an opkg */ + int unzipped_opkg_pid; + FILE *unzipped_opkg_stream; file_header_t *tar_header; archive_offset = 0; fseek(deb_stream, 0, SEEK_SET); - unzipped_ipkg_stream = gz_open(deb_stream, &unzipped_ipkg_pid); + unzipped_opkg_stream = gz_open(deb_stream, &unzipped_opkg_pid); - /*fprintf(stderr, __FUNCTION__ ": processing ipkg %s -- ared_file=%s\n", package_filename, ared_file);*/ + /*fprintf(stderr, __FUNCTION__ ": processing opkg %s -- ared_file=%s\n", package_filename, ared_file);*/ /* walk through outer tar file to find ared_file */ - while ((tar_header = get_header_tar(unzipped_ipkg_stream)) != NULL) { + while ((tar_header = get_header_tar(unzipped_opkg_stream)) != NULL) { int name_offset = 0; if (strncmp(tar_header->name, "./", 2) == 0) name_offset = 2; if (strcmp(ared_file, tar_header->name+name_offset) == 0) { /* open a stream of decompressed data */ - uncompressed_stream = gz_open(unzipped_ipkg_stream, &gunzip_pid); + uncompressed_stream = gz_open(unzipped_opkg_stream, &gunzip_pid); archive_offset = 0; /*fprintf(stderr, __FUNCTION__ ":%d: here -- found file\n", __LINE__);*/ output_buffer = unarchive(uncompressed_stream, @@ -794,11 +794,11 @@ char *deb_extract(const char *package_filename, FILE *out_stream, fclose(uncompressed_stream); break; } - seek_sub_file(unzipped_ipkg_stream, tar_header->size); + seek_sub_file(unzipped_opkg_stream, tar_header->size); free_header_tar(tar_header); } - gz_close(unzipped_ipkg_pid); - fclose(unzipped_ipkg_stream); + gz_close(unzipped_opkg_pid); + fclose(unzipped_opkg_stream); fclose(deb_stream); free(ared_file); /*fprintf(stderr, __FUNCTION__ ":%d: done\n", __LINE__);*/ -- cgit v0.9.1