Contents of /trunk/mkinitrd-magellan/busybox/archival/libunarchive/unpack_ar_archive.c
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
File MIME type: text/plain
File size: 494 byte(s)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
File MIME type: text/plain
File size: 494 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* vi: set sw=4 ts=4: */ |
2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ |
5 | #include <fcntl.h> |
6 | #include <stdlib.h> |
7 | #include <string.h> |
8 | #include "unarchive.h" |
9 | #include "libbb.h" |
10 | |
11 | void unpack_ar_archive(archive_handle_t *ar_archive) |
12 | { |
13 | char magic[7]; |
14 | |
15 | xread(ar_archive->src_fd, magic, 7); |
16 | if (strncmp(magic, "!<arch>", 7) != 0) { |
17 | bb_error_msg_and_die("invalid ar magic"); |
18 | } |
19 | ar_archive->offset += 7; |
20 | |
21 | while (get_header_ar(ar_archive) == EXIT_SUCCESS); |
22 | } |