diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2025-04-20 23:43:19 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2025-04-20 23:49:33 +0200 |
| commit | c61fdadf974205104f6690ad360117bdf86f0ba6 (patch) | |
| tree | e0dace986e6b3dd538f083795ac206c23645f757 /miscutils | |
| parent | 636315ccb9b9e7e6cb040a9626282b7892b20df3 (diff) | |
| download | busybox-w32-c61fdadf974205104f6690ad360117bdf86f0ba6.tar.gz busybox-w32-c61fdadf974205104f6690ad360117bdf86f0ba6.tar.bz2 busybox-w32-c61fdadf974205104f6690ad360117bdf86f0ba6.zip | |
libbb/archival: make setup_unzip_on_fd() return bytes read if not compressed
setup_unzip_on_fd() does not return the transformer structure, so the user
does not know how much to seek back (or alternatively what the signature was)
when compressor signature is not detected.
Currently not needed (the only user is tar which dies anyway).
However, rpm2cpio may need this if we extend it to extract the internal .cpio
even if cpio's compressions algo is not known.
function old new delta
setup_unzip_on_fd 53 59 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/fbsplash.c | 2 | ||||
| -rw-r--r-- | miscutils/man.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 2934d8eb7..912a501a3 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
| @@ -382,7 +382,7 @@ static void fb_drawimage(void) | |||
| 382 | if (LONE_DASH(G.image_filename)) { | 382 | if (LONE_DASH(G.image_filename)) { |
| 383 | theme_file = stdin; | 383 | theme_file = stdin; |
| 384 | } else { | 384 | } else { |
| 385 | int fd = open_zipped(G.image_filename, /*fail_if_not_compressed:*/ 0); | 385 | int fd = open_zipped(G.image_filename, /*die_if_not_compressed:*/ 0); |
| 386 | if (fd < 0) | 386 | if (fd < 0) |
| 387 | bb_simple_perror_msg_and_die(G.image_filename); | 387 | bb_simple_perror_msg_and_die(G.image_filename); |
| 388 | theme_file = xfdopen_for_read(fd); | 388 | theme_file = xfdopen_for_read(fd); |
diff --git a/miscutils/man.c b/miscutils/man.c index deaf9e5ab..6fa1fbfdc 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
| @@ -143,7 +143,7 @@ static int run_pipe(char *man_filename, int man, int level) | |||
| 143 | 143 | ||
| 144 | ordinary_manpage: | 144 | ordinary_manpage: |
| 145 | close(STDIN_FILENO); | 145 | close(STDIN_FILENO); |
| 146 | open_zipped(man_filename, /*fail_if_not_compressed:*/ 0); /* guaranteed to use fd 0 (STDIN_FILENO) */ | 146 | open_zipped(man_filename, /*die_if_not_compressed:*/ 0); /* guaranteed to use fd 0 (STDIN_FILENO) */ |
| 147 | if (man) { | 147 | if (man) { |
| 148 | int w = get_terminal_width(-1); | 148 | int w = get_terminal_width(-1); |
| 149 | if (w > 10) | 149 | if (w > 10) |
