Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/archival/libunarchive/filter_accept_list_reassign.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/archival/libunarchive/filter_accept_list_reassign.c
r821 r1770 1 /* vi: set sw=4 ts=4: */ 1 2 /* 2 3 * Copyright (C) 2002 by Glenn McGrath 3 4 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 5 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 17 6 */ 18 19 #include <stdlib.h>20 #include <string.h>21 #include <unistd.h>22 7 23 8 #include "libbb.h" … … 25 10 26 11 /* 27 * 28 * 29 * 12 * Reassign the subarchive metadata parser based on the filename extension 13 * e.g. if its a .tar.gz modify archive_handle->sub_archive to process a .tar.gz 14 * or if its a .tar.bz2 make archive_handle->sub_archive handle that 30 15 */ 31 16 char filter_accept_list_reassign(archive_handle_t *archive_handle) … … 39 24 40 25 /* Modify the subarchive handler based on the extension */ 41 #if def CONFIG_FEATURE_DEB_TAR_GZ26 #if ENABLE_FEATURE_DEB_TAR_GZ 42 27 if (strcmp(name_ptr, ".gz") == 0) { 43 28 archive_handle->action_data_subarchive = get_header_tar_gz; 44 return (EXIT_SUCCESS);29 return EXIT_SUCCESS; 45 30 } 46 31 #endif 47 #if def CONFIG_FEATURE_DEB_TAR_BZ232 #if ENABLE_FEATURE_DEB_TAR_BZ2 48 33 if (strcmp(name_ptr, ".bz2") == 0) { 49 34 archive_handle->action_data_subarchive = get_header_tar_bz2; 50 return (EXIT_SUCCESS);35 return EXIT_SUCCESS; 51 36 } 52 37 #endif 53 38 if (ENABLE_FEATURE_DEB_TAR_LZMA && !strcmp(name_ptr, ".lzma")) { 54 39 archive_handle->action_data_subarchive = get_header_tar_lzma; 55 return (EXIT_SUCCESS);40 return EXIT_SUCCESS; 56 41 } 57 42 } 58 return (EXIT_FAILURE);43 return EXIT_FAILURE; 59 44 }
Note:
See TracChangeset
for help on using the changeset viewer.