distextract.c (232200) | distextract.c (248612) |
---|---|
1/*- 2 * Copyright (c) 2011 Nathan Whitehorn 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2011 Nathan Whitehorn 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/bsdinstall/distextract/distextract.c 232200 2012-02-26 22:09:21Z nwhitehorn $ | 26 * $FreeBSD: head/usr.sbin/bsdinstall/distextract/distextract.c 248612 2013-03-22 10:17:42Z mm $ |
27 */ 28 29#include <sys/param.h> 30#include <stdio.h> 31#include <errno.h> 32#include <limits.h> 33#include <archive.h> 34#include <dialog.h> --- 86 unchanged lines hidden (view full) --- 121 if (tok1 != NULL) 122 return atoi(tok1); 123 } 124 } 125 126 /* Either we didn't have a manifest, or this archive wasn't there */ 127 archive = archive_read_new(); 128 archive_read_support_format_all(archive); | 27 */ 28 29#include <sys/param.h> 30#include <stdio.h> 31#include <errno.h> 32#include <limits.h> 33#include <archive.h> 34#include <dialog.h> --- 86 unchanged lines hidden (view full) --- 121 if (tok1 != NULL) 122 return atoi(tok1); 123 } 124 } 125 126 /* Either we didn't have a manifest, or this archive wasn't there */ 127 archive = archive_read_new(); 128 archive_read_support_format_all(archive); |
129 archive_read_support_compression_all(archive); | 129 archive_read_support_filter_all(archive); |
130 sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), file); 131 err = archive_read_open_filename(archive, path, 4096); 132 if (err != ARCHIVE_OK) { 133 snprintf(errormsg, sizeof(errormsg), 134 "Error while extracting %s: %s\n", file, 135 archive_error_string(archive)); 136 dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); 137 return (-1); --- 45 unchanged lines hidden (view full) --- 183 total_files += archive_files[i]; 184 } 185 186 current_files = 0; 187 188 for (i = 0; i < nfiles; i++) { 189 archive = archive_read_new(); 190 archive_read_support_format_all(archive); | 130 sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), file); 131 err = archive_read_open_filename(archive, path, 4096); 132 if (err != ARCHIVE_OK) { 133 snprintf(errormsg, sizeof(errormsg), 134 "Error while extracting %s: %s\n", file, 135 archive_error_string(archive)); 136 dialog_msgbox("Extract Error", errormsg, 0, 0, TRUE); 137 return (-1); --- 45 unchanged lines hidden (view full) --- 183 total_files += archive_files[i]; 184 } 185 186 current_files = 0; 187 188 for (i = 0; i < nfiles; i++) { 189 archive = archive_read_new(); 190 archive_read_support_format_all(archive); |
191 archive_read_support_compression_all(archive); | 191 archive_read_support_filter_all(archive); |
192 sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), files[i]); 193 err = archive_read_open_filename(archive, path, 4096); 194 195 items[i*2 + 1] = "In Progress"; 196 archive_file = 0; 197 198 while ((err = archive_read_next_header(archive, &entry)) == 199 ARCHIVE_OK) { --- 42 unchanged lines hidden --- | 192 sprintf(path, "%s/%s", getenv("BSDINSTALL_DISTDIR"), files[i]); 193 err = archive_read_open_filename(archive, path, 4096); 194 195 items[i*2 + 1] = "In Progress"; 196 archive_file = 0; 197 198 while ((err = archive_read_next_header(archive, &entry)) == 199 ARCHIVE_OK) { --- 42 unchanged lines hidden --- |