Deleted Added
full compact
archive_write_set_format_cpio.c (311041) archive_write_set_format_cpio.c (344673)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "archive_platform.h"
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "archive_platform.h"
28__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio.c 311041 2017-01-02 01:41:31Z mm $");
28__FBSDID("$FreeBSD: stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio.c 344673 2019-02-28 22:56:15Z mm $");
29
30#ifdef HAVE_ERRNO_H
31#include <errno.h>
32#endif
33#include <stdio.h>
34#ifdef HAVE_STDLIB_H
35#include <stdlib.h>
36#endif

--- 366 unchanged lines hidden (view full) ---

403 if (p != NULL && *p != '\0') {
404 ret = __archive_write_output(a, p, strlen(p));
405 if (ret != ARCHIVE_OK) {
406 ret_final = ARCHIVE_FATAL;
407 goto exit_write_header;
408 }
409 }
410exit_write_header:
29
30#ifdef HAVE_ERRNO_H
31#include <errno.h>
32#endif
33#include <stdio.h>
34#ifdef HAVE_STDLIB_H
35#include <stdlib.h>
36#endif

--- 366 unchanged lines hidden (view full) ---

403 if (p != NULL && *p != '\0') {
404 ret = __archive_write_output(a, p, strlen(p));
405 if (ret != ARCHIVE_OK) {
406 ret_final = ARCHIVE_FATAL;
407 goto exit_write_header;
408 }
409 }
410exit_write_header:
411 if (entry_main)
412 archive_entry_free(entry_main);
411 archive_entry_free(entry_main);
413 return (ret_final);
414}
415
416static ssize_t
417archive_write_cpio_data(struct archive_write *a, const void *buff, size_t s)
418{
419 struct cpio *cpio;
420 int ret;

--- 80 unchanged lines hidden ---
412 return (ret_final);
413}
414
415static ssize_t
416archive_write_cpio_data(struct archive_write *a, const void *buff, size_t s)
417{
418 struct cpio *cpio;
419 int ret;

--- 80 unchanged lines hidden ---