diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-21 11:58:14 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-21 11:58:14 +0000 |
commit | 9229794ab33fa510a5896784958b90f87bef6876 (patch) | |
tree | cbf063d72178aac42b71fe233dc20e5bc226463e /archival | |
parent | a8381948da79b06071c17853a9a2a59947742c8d (diff) | |
download | busybox-w32-9229794ab33fa510a5896784958b90f87bef6876.tar.gz busybox-w32-9229794ab33fa510a5896784958b90f87bef6876.tar.bz2 busybox-w32-9229794ab33fa510a5896784958b90f87bef6876.zip |
insmod_ng_main: -80 bytes. Stopp mmapping, use xmalloc_open_read_close().
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/archive_xread_all_eof.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c index 8513ffecb..007f68c6d 100644 --- a/archival/libunarchive/archive_xread_all_eof.c +++ b/archival/libunarchive/archive_xread_all_eof.c | |||
@@ -3,19 +3,18 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <stdio.h> | ||
7 | #include <stdlib.h> | ||
8 | #include <string.h> | ||
9 | #include "unarchive.h" | 6 | #include "unarchive.h" |
10 | #include "libbb.h" | 7 | #include "libbb.h" |
11 | 8 | ||
12 | ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count) | 9 | ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, |
10 | unsigned char *buf, size_t count) | ||
13 | { | 11 | { |
14 | ssize_t size; | 12 | ssize_t size; |
15 | 13 | ||
16 | size = full_read(archive_handle->src_fd, buf, count); | 14 | size = full_read(archive_handle->src_fd, buf, count); |
17 | if ((size != 0) && (size != count)) { | 15 | if (size != 0 && size != count) { |
18 | bb_perror_msg_and_die("short read, read %ld of %ld", (long)size, (long)count); | 16 | bb_error_msg_and_die("short read: %u of %u", |
17 | (unsigned)size, (unsigned)count); | ||
19 | } | 18 | } |
20 | return(size); | 19 | return size; |
21 | } | 20 | } |