Deleted Added
full compact
cpio.c (313570) cpio.c (315432)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
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

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

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
28#include "cpio_platform.h"
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
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

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

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
28#include "cpio_platform.h"
29__FBSDID("$FreeBSD: stable/11/contrib/libarchive/cpio/cpio.c 313570 2017-02-11 00:54:16Z mm $");
29__FBSDID("$FreeBSD: stable/11/contrib/libarchive/cpio/cpio.c 315432 2017-03-16 23:07:35Z mm $");
30
31#include <sys/types.h>
32#include <archive.h>
33#include <archive_entry.h>
34
35#ifdef HAVE_SYS_MKDEV_H
36#include <sys/mkdev.h>
37#endif

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

103
104static int extract_data(struct archive *, struct archive *);
105const char * cpio_i64toa(int64_t);
106static const char *cpio_rename(const char *name);
107static int entry_to_archive(struct cpio *, struct archive_entry *);
108static int file_to_archive(struct cpio *, const char *);
109static void free_cache(struct name_cache *cache);
110static void list_item_verbose(struct cpio *, struct archive_entry *);
30
31#include <sys/types.h>
32#include <archive.h>
33#include <archive_entry.h>
34
35#ifdef HAVE_SYS_MKDEV_H
36#include <sys/mkdev.h>
37#endif

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

103
104static int extract_data(struct archive *, struct archive *);
105const char * cpio_i64toa(int64_t);
106static const char *cpio_rename(const char *name);
107static int entry_to_archive(struct cpio *, struct archive_entry *);
108static int file_to_archive(struct cpio *, const char *);
109static void free_cache(struct name_cache *cache);
110static void list_item_verbose(struct cpio *, struct archive_entry *);
111static void long_help(void);
111static void long_help(void) __LA_DEAD;
112static const char *lookup_gname(struct cpio *, gid_t gid);
113static int lookup_gname_helper(struct cpio *,
114 const char **name, id_t gid);
115static const char *lookup_uname(struct cpio *, uid_t uid);
116static int lookup_uname_helper(struct cpio *,
117 const char **name, id_t uid);
112static const char *lookup_gname(struct cpio *, gid_t gid);
113static int lookup_gname_helper(struct cpio *,
114 const char **name, id_t gid);
115static const char *lookup_uname(struct cpio *, uid_t uid);
116static int lookup_uname_helper(struct cpio *,
117 const char **name, id_t uid);
118static void mode_in(struct cpio *);
119static void mode_list(struct cpio *);
118static void mode_in(struct cpio *) __LA_DEAD;
119static void mode_list(struct cpio *) __LA_DEAD;
120static void mode_out(struct cpio *);
121static void mode_pass(struct cpio *, const char *);
122static const char *remove_leading_slash(const char *);
123static int restore_time(struct cpio *, struct archive_entry *,
124 const char *, int fd);
120static void mode_out(struct cpio *);
121static void mode_pass(struct cpio *, const char *);
122static const char *remove_leading_slash(const char *);
123static int restore_time(struct cpio *, struct archive_entry *,
124 const char *, int fd);
125static void usage(void);
126static void version(void);
125static void usage(void) __LA_DEAD;
126static void version(void) __LA_DEAD;
127static const char * passphrase_callback(struct archive *, void *);
128static void passphrase_free(char *);
129
130int
131main(int argc, char *argv[])
132{
133 static char buff[16384];
134 struct cpio _cpio; /* Allocated on stack. */

--- 1337 unchanged lines hidden ---
127static const char * passphrase_callback(struct archive *, void *);
128static void passphrase_free(char *);
129
130int
131main(int argc, char *argv[])
132{
133 static char buff[16384];
134 struct cpio _cpio; /* Allocated on stack. */

--- 1337 unchanged lines hidden ---