Fix zcat
This commit is contained in:
parent
ed7a776538
commit
5f2ef46d6d
@ -1074,16 +1074,14 @@ extern int gunzip_main(int argc, char **argv)
|
|||||||
int opt = 0;
|
int opt = 0;
|
||||||
int delete_old_file = FALSE;
|
int delete_old_file = FALSE;
|
||||||
|
|
||||||
#ifdef BB_ZCAT
|
|
||||||
/* if called as zcat */
|
/* if called as zcat */
|
||||||
if (strcmp(applet_name, "zcat") == 0) {
|
if (strcmp(applet_name, "zcat") == 0) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
show_usage();
|
show_usage();
|
||||||
}
|
}
|
||||||
|
optind = 1;
|
||||||
flags |= (gunzip_force | gunzip_to_stdout);
|
flags |= (gunzip_force | gunzip_to_stdout);
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
if (strcmp(applet_name, "gunzip") == 0) {
|
|
||||||
/* workout flags as regular gunzip */
|
/* workout flags as regular gunzip */
|
||||||
/* set default flags */
|
/* set default flags */
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
|
6
gunzip.c
6
gunzip.c
@ -1074,16 +1074,14 @@ extern int gunzip_main(int argc, char **argv)
|
|||||||
int opt = 0;
|
int opt = 0;
|
||||||
int delete_old_file = FALSE;
|
int delete_old_file = FALSE;
|
||||||
|
|
||||||
#ifdef BB_ZCAT
|
|
||||||
/* if called as zcat */
|
/* if called as zcat */
|
||||||
if (strcmp(applet_name, "zcat") == 0) {
|
if (strcmp(applet_name, "zcat") == 0) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
show_usage();
|
show_usage();
|
||||||
}
|
}
|
||||||
|
optind = 1;
|
||||||
flags |= (gunzip_force | gunzip_to_stdout);
|
flags |= (gunzip_force | gunzip_to_stdout);
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
if (strcmp(applet_name, "gunzip") == 0) {
|
|
||||||
/* workout flags as regular gunzip */
|
/* workout flags as regular gunzip */
|
||||||
/* set default flags */
|
/* set default flags */
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user