return (ARCHIVE_FATAL);
}
-int64_t
-__archive_read_consume_all(struct archive_read *a)
-{
- int64_t total_bytes_skipped = 0;
- off_t bytes_skipped;
- int64_t request = 1024 * 1024 * 1024UL; /* Skip 1 GB at a time. */
-
- for (;;) {
- bytes_skipped = advance_file_pointer(a->filter, request);
- if (bytes_skipped < 0)
- return (ARCHIVE_FATAL);
- total_bytes_skipped += bytes_skipped;
- if (bytes_skipped < request)
- return (total_bytes_skipped);
- }
-}
-
/*
* Advance the file pointer by the amount requested.
* Returns the amount actually advanced, which may be less than the
size_t, ssize_t *);
int64_t __archive_read_consume(struct archive_read *, int64_t);
int64_t __archive_read_filter_consume(struct archive_read_filter *, int64_t);
-int64_t __archive_read_consume_all(struct archive_read *);
int __archive_read_program(struct archive_read_filter *, const char *);
#endif
static int
archive_read_format_raw_read_data_skip(struct archive_read *a)
{
- int64_t skipped;
- struct raw_info *info;
-
- info = (struct raw_info *)(a->format->data);
- if (info->end_of_file)
- return (ARCHIVE_EOF);
- info->end_of_file = 1;
- skipped = __archive_read_consume_all(a);
- if (skipped < 0)
- return ((int)skipped);
+ (void)a; /* UNUSED */
return (ARCHIVE_OK);
}