aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c6
-rw-r--r--archival/bunzip2.c4
-rw-r--r--archival/cpio.c4
-rw-r--r--archival/dpkg_deb.c6
-rw-r--r--archival/gunzip.c4
-rw-r--r--archival/gzip.c6
-rw-r--r--archival/tar.c8
-rw-r--r--archival/uncompress.c2
-rw-r--r--archival/unlzma.c4
9 files changed, 22 insertions, 22 deletions
diff --git a/archival/ar.c b/archival/ar.c
index e10bf7c47..06a879b93 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -41,7 +41,7 @@ static void header_verbose_list_ar(const file_header_t *file_header)
41int ar_main(int argc, char **argv) 41int ar_main(int argc, char **argv)
42{ 42{
43 archive_handle_t *archive_handle; 43 archive_handle_t *archive_handle;
44 unsigned long opt; 44 unsigned opt;
45 static const char msg_unsupported_err[] = 45 static const char msg_unsupported_err[] =
46 "Archive %s not supported. Install binutils 'ar'."; 46 "Archive %s not supported. Install binutils 'ar'.";
47 char magic[8]; 47 char magic[8];
@@ -49,8 +49,8 @@ int ar_main(int argc, char **argv)
49 archive_handle = init_handle(); 49 archive_handle = init_handle();
50 50
51 /* Prepend '-' to the first argument if required */ 51 /* Prepend '-' to the first argument if required */
52 bb_opt_complementally = "--:p:t:x:-1:?:p--tx:t--px:x--pt"; 52 opt_complementary = "--:p:t:x:-1:?:p--tx:t--px:x--pt";
53 opt = bb_getopt_ulflags(argc, argv, "ptxovcr"); 53 opt = getopt32(argc, argv, "ptxovcr");
54 54
55 if (opt & AR_CTX_PRINT) { 55 if (opt & AR_CTX_PRINT) {
56 archive_handle->action_data = data_extract_to_stdout; 56 archive_handle->action_data = data_extract_to_stdout;
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 9d62366c3..faf997bbe 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -16,10 +16,10 @@ int bunzip2_main(int argc, char **argv)
16{ 16{
17 USE_DESKTOP(long long) int status; 17 USE_DESKTOP(long long) int status;
18 char *filename; 18 char *filename;
19 unsigned long opt; 19 unsigned opt;
20 int src_fd, dst_fd; 20 int src_fd, dst_fd;
21 21
22 opt = bb_getopt_ulflags(argc, argv, "cf"); 22 opt = getopt32(argc, argv, "cf");
23 23
24 /* Set input filename and number */ 24 /* Set input filename and number */
25 filename = argv[optind]; 25 filename = argv[optind];
diff --git a/archival/cpio.c b/archival/cpio.c
index 48b688e79..d0d3288ff 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -30,7 +30,7 @@ int cpio_main(int argc, char **argv)
30{ 30{
31 archive_handle_t *archive_handle; 31 archive_handle_t *archive_handle;
32 char *cpio_filename = NULL; 32 char *cpio_filename = NULL;
33 unsigned long opt; 33 unsigned opt;
34 34
35 /* Initialise */ 35 /* Initialise */
36 archive_handle = init_handle(); 36 archive_handle = init_handle();
@@ -38,7 +38,7 @@ int cpio_main(int argc, char **argv)
38 archive_handle->seek = seek_by_char; 38 archive_handle->seek = seek_by_char;
39 archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE; 39 archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE;
40 40
41 opt = bb_getopt_ulflags(argc, argv, "ituvF:dm", &cpio_filename); 41 opt = getopt32(argc, argv, "ituvF:dm", &cpio_filename);
42 42
43 /* One of either extract or test options must be given */ 43 /* One of either extract or test options must be given */
44 if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) { 44 if ((opt & (CPIO_OPT_TEST | CPIO_OPT_EXTRACT)) == 0) {
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index ce65e219a..80a5f3250 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -18,7 +18,7 @@ int dpkg_deb_main(int argc, char **argv)
18 archive_handle_t *ar_archive; 18 archive_handle_t *ar_archive;
19 archive_handle_t *tar_archive; 19 archive_handle_t *tar_archive;
20 llist_t *control_tar_llist = NULL; 20 llist_t *control_tar_llist = NULL;
21 unsigned long opt; 21 unsigned opt;
22 char *extract_dir = NULL; 22 char *extract_dir = NULL;
23 short argcount = 1; 23 short argcount = 1;
24 24
@@ -40,8 +40,8 @@ int dpkg_deb_main(int argc, char **argv)
40 llist_add_to(&control_tar_llist, "control.tar.bz2"); 40 llist_add_to(&control_tar_llist, "control.tar.bz2");
41#endif 41#endif
42 42
43 bb_opt_complementally = "?c--efXx:e--cfXx:f--ceXx:X--cefx:x--cefX"; 43 opt_complementary = "?c--efXx:e--cfXx:f--ceXx:X--cefx:x--cefX";
44 opt = bb_getopt_ulflags(argc, argv, "cefXx"); 44 opt = getopt32(argc, argv, "cefXx");
45 45
46 if (opt & DPKG_DEB_OPT_CONTENTS) { 46 if (opt & DPKG_DEB_OPT_CONTENTS) {
47 tar_archive->action_header = header_verbose_list; 47 tar_archive->action_header = header_verbose_list;
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 1b4968628..1cde08b4d 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -40,9 +40,9 @@ int gunzip_main(int argc, char **argv)
40{ 40{
41 USE_DESKTOP(long long) int status; 41 USE_DESKTOP(long long) int status;
42 int exitcode = 0; 42 int exitcode = 0;
43 unsigned long opt; 43 unsigned opt;
44 44
45 opt = bb_getopt_ulflags(argc, argv, "cftdv"); 45 opt = getopt32(argc, argv, "cftdv");
46 /* if called as zcat */ 46 /* if called as zcat */
47 if (strcmp(bb_applet_name, "zcat") == 0) { 47 if (strcmp(bb_applet_name, "zcat") == 0) {
48 opt |= GUNZIP_OPT_STDOUT; 48 opt |= GUNZIP_OPT_STDOUT;
diff --git a/archival/gzip.c b/archival/gzip.c
index 2fc9f7698..ef3724c34 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1134,14 +1134,14 @@ int gzip_main(int argc, char **argv)
1134 OPT_force = 0x2, 1134 OPT_force = 0x2,
1135 }; 1135 };
1136 1136
1137 unsigned long opt; 1137 unsigned opt;
1138 int result; 1138 int result;
1139 int inFileNum; 1139 int inFileNum;
1140 int outFileNum; 1140 int outFileNum;
1141 struct stat statBuf; 1141 struct stat statBuf;
1142 char *delFileName; 1142 char *delFileName;
1143 1143
1144 opt = bb_getopt_ulflags(argc, argv, "cf123456789qv" USE_GUNZIP("d")); 1144 opt = getopt32(argc, argv, "cf123456789qv" USE_GUNZIP("d"));
1145 //if (opt & 0x1) // -c 1145 //if (opt & 0x1) // -c
1146 //if (opt & 0x2) // -f 1146 //if (opt & 0x2) // -f
1147 /* Ignore 1-9 (compression level) options */ 1147 /* Ignore 1-9 (compression level) options */
@@ -1157,7 +1157,7 @@ int gzip_main(int argc, char **argv)
1157 //if (opt & 0x800) // -q 1157 //if (opt & 0x800) // -q
1158 //if (opt & 0x1000) // -v 1158 //if (opt & 0x1000) // -v
1159 if (ENABLE_GUNZIP && (opt & 0x2000)) { // -d 1159 if (ENABLE_GUNZIP && (opt & 0x2000)) { // -d
1160 /* FIXME: bb_getopt_ulflags should not depend on optind */ 1160 /* FIXME: getopt32 should not depend on optind */
1161 optind = 1; 1161 optind = 1;
1162 return gunzip_main(argc, argv); 1162 return gunzip_main(argc, argv);
1163 } 1163 }
diff --git a/archival/tar.c b/archival/tar.c
index bfee638b4..3775598cc 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -688,7 +688,7 @@ int tar_main(int argc, char **argv)
688 archive_handle_t *tar_handle; 688 archive_handle_t *tar_handle;
689 char *base_dir = NULL; 689 char *base_dir = NULL;
690 const char *tar_filename = "-"; 690 const char *tar_filename = "-";
691 unsigned long opt; 691 unsigned opt;
692 llist_t *excludes = NULL; 692 llist_t *excludes = NULL;
693 693
694 /* Initialise default values */ 694 /* Initialise default values */
@@ -696,12 +696,12 @@ int tar_main(int argc, char **argv)
696 tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL; 696 tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL;
697 697
698 /* Prepend '-' to the first argument if required */ 698 /* Prepend '-' to the first argument if required */
699 bb_opt_complementally = ENABLE_FEATURE_TAR_CREATE ? 699 opt_complementary = ENABLE_FEATURE_TAR_CREATE ?
700 "--:X::T::\n::c:t:x:?:c--tx:t--cx:x--ct" : 700 "--:X::T::\n::c:t:x:?:c--tx:t--cx:x--ct" :
701 "--:X::T::\n::t:x:?:t--x:x--t"; 701 "--:X::T::\n::t:x:?:t--x:x--t";
702 if (ENABLE_FEATURE_TAR_LONG_OPTIONS) 702 if (ENABLE_FEATURE_TAR_LONG_OPTIONS)
703 bb_applet_long_options = tar_long_options; 703 applet_long_options = tar_long_options;
704 opt = bb_getopt_ulflags(argc, argv, tar_options, 704 opt = getopt32(argc, argv, tar_options,
705 &base_dir, /* Change to dir <optarg> */ 705 &base_dir, /* Change to dir <optarg> */
706 &tar_filename /* archive filename */ 706 &tar_filename /* archive filename */
707#ifdef CONFIG_FEATURE_TAR_FROM 707#ifdef CONFIG_FEATURE_TAR_FROM
diff --git a/archival/uncompress.c b/archival/uncompress.c
index 91568e45f..d1b0d2cb3 100644
--- a/archival/uncompress.c
+++ b/archival/uncompress.c
@@ -16,7 +16,7 @@ int uncompress_main(int argc, char **argv)
16 int status = EXIT_SUCCESS; 16 int status = EXIT_SUCCESS;
17 unsigned long flags; 17 unsigned long flags;
18 18
19 flags = bb_getopt_ulflags(argc, argv, "cf"); 19 flags = getopt32(argc, argv, "cf");
20 20
21 while (optind < argc) { 21 while (optind < argc) {
22 char *compressed_file = argv[optind++]; 22 char *compressed_file = argv[optind++];
diff --git a/archival/unlzma.c b/archival/unlzma.c
index b87a3fe79..20891e316 100644
--- a/archival/unlzma.c
+++ b/archival/unlzma.c
@@ -19,10 +19,10 @@ int unlzma_main(int argc, char **argv)
19{ 19{
20 USE_DESKTOP(long long) int status; 20 USE_DESKTOP(long long) int status;
21 char *filename; 21 char *filename;
22 unsigned long opt; 22 unsigned opt;
23 int src_fd, dst_fd; 23 int src_fd, dst_fd;
24 24
25 opt = bb_getopt_ulflags(argc, argv, "c"); 25 opt = getopt32(argc, argv, "c");
26 26
27 /* Set input filename and number */ 27 /* Set input filename and number */
28 filename = argv[optind]; 28 filename = argv[optind];