diff options
author | Denis Vlasenko | 2008-07-12 09:20:44 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-07-12 09:20:44 +0000 |
commit | a46dd89e9451ec73a4df54427110cdfc28d8b031 (patch) | |
tree | 2e470b3c0236524905a6d399c5207cccaef2fc7b /archival/libunarchive/archive_xread_all_eof.c | |
parent | 39acf453353a41a78fbc220360e884eb0eb33a59 (diff) | |
download | busybox-a46dd89e9451ec73a4df54427110cdfc28d8b031.zip busybox-a46dd89e9451ec73a4df54427110cdfc28d8b031.tar.gz |
cpio: internalize archive_xread_all_eof. add a few paranoia checks
for corrupted cpio files.
modprobe-small: remove stray include
route: small code shrink
function old new delta
get_header_cpio 958 980 +22
archive_xread_all_eof 33 - -33
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 22/-33) Total: -11 bytes
Diffstat (limited to 'archival/libunarchive/archive_xread_all_eof.c')
-rw-r--r-- | archival/libunarchive/archive_xread_all_eof.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c deleted file mode 100644 index f11a7fd..0000000 --- a/archival/libunarchive/archive_xread_all_eof.c +++ /dev/null @@ -1,20 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. - */ - -#include "libbb.h" -#include "unarchive.h" - -ssize_t FAST_FUNC archive_xread_all_eof(archive_handle_t *archive_handle, - unsigned char *buf, size_t count) -{ - ssize_t size; - - size = full_read(archive_handle->src_fd, buf, count); - if (size != 0 && size != (ssize_t)count) { - bb_error_msg_and_die("short read: %u of %u", - (unsigned)size, (unsigned)count); - } - return size; -} |