aboutsummaryrefslogtreecommitdiff
path: root/archival/cpio.c
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-11 01:05:30 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-09-11 01:05:30 +0000
commit802d9007472de0b933d195c4f745a7b78b09f7d8 (patch)
tree0358a910b954c6c7fdcaddf389693a0c2e96ef70 /archival/cpio.c
parent72f79f2e43279d1d731ec47a18187452420d66a5 (diff)
downloadbusybox-w32-802d9007472de0b933d195c4f745a7b78b09f7d8.tar.gz
busybox-w32-802d9007472de0b933d195c4f745a7b78b09f7d8.tar.bz2
busybox-w32-802d9007472de0b933d195c4f745a7b78b09f7d8.zip
Cleanup patch by Bernhard Fischer, removing unnecessary includes of
getopt.h, whitespace changes, typos, etc. git-svn-id: svn://busybox.net/trunk/busybox@11422 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival/cpio.c')
-rw-r--r--archival/cpio.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index 0fbe7b8e5..820f03e9b 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -24,20 +24,19 @@
24 * 24 *
25 */ 25 */
26#include <fcntl.h> 26#include <fcntl.h>
27#include <getopt.h>
28#include <stdlib.h> 27#include <stdlib.h>
29#include <string.h> 28#include <string.h>
30#include <unistd.h> 29#include <unistd.h>
31#include "unarchive.h" 30#include "unarchive.h"
32#include "busybox.h" 31#include "busybox.h"
33 32
34#define CPIO_OPT_EXTRACT 0x01 33#define CPIO_OPT_EXTRACT 0x01
35#define CPIO_OPT_TEST 0x02 34#define CPIO_OPT_TEST 0x02
36#define CPIO_OPT_UNCONDITIONAL 0x04 35#define CPIO_OPT_UNCONDITIONAL 0x04
37#define CPIO_OPT_VERBOSE 0x08 36#define CPIO_OPT_VERBOSE 0x08
38#define CPIO_OPT_FILE 0x10 37#define CPIO_OPT_FILE 0x10
39#define CPIO_OPT_CREATE_LEADING_DIR 0x20 38#define CPIO_OPT_CREATE_LEADING_DIR 0x20
40#define CPIO_OPT_PRESERVE_MTIME 0x40 39#define CPIO_OPT_PRESERVE_MTIME 0x40
41 40
42extern int cpio_main(int argc, char **argv) 41extern int cpio_main(int argc, char **argv)
43{ 42{
@@ -59,7 +58,7 @@ extern int cpio_main(int argc, char **argv)
59 } 58 }
60 59
61 if (opt & CPIO_OPT_TEST) { 60 if (opt & CPIO_OPT_TEST) {
62 /* if both extract and test option are given, ignore extract option */ 61 /* if both extract and test options are given, ignore extract option */
63 if (opt & CPIO_OPT_EXTRACT) { 62 if (opt & CPIO_OPT_EXTRACT) {
64 opt &= ~CPIO_OPT_EXTRACT; 63 opt &= ~CPIO_OPT_EXTRACT;
65 } 64 }
@@ -79,7 +78,7 @@ extern int cpio_main(int argc, char **argv)
79 archive_handle->action_header = header_list; 78 archive_handle->action_header = header_list;
80 } 79 }
81 } 80 }
82 if (cpio_filename) { /* CPIO_OPT_FILE */ 81 if (cpio_filename) { /* CPIO_OPT_FILE */
83 archive_handle->src_fd = bb_xopen(cpio_filename, O_RDONLY); 82 archive_handle->src_fd = bb_xopen(cpio_filename, O_RDONLY);
84 archive_handle->seek = seek_by_jump; 83 archive_handle->seek = seek_by_jump;
85 } 84 }