Annotation of /trunk/mkinitrd-magellan/busybox/archival/libunarchive/data_align.c
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 505 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 505 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 | niro | 532 | /* vi: set sw=4 ts=4: */ |
2 | /* | ||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
4 | */ | ||
5 | |||
6 | #include <sys/types.h> | ||
7 | |||
8 | #include <errno.h> | ||
9 | #include <unistd.h> | ||
10 | |||
11 | #include "libbb.h" | ||
12 | #include "unarchive.h" | ||
13 | |||
14 | void data_align(archive_handle_t *archive_handle, const unsigned short boundary) | ||
15 | { | ||
16 | const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary; | ||
17 | |||
18 | archive_handle->seek(archive_handle, skip_amount); | ||
19 | archive_handle->offset += skip_amount; | ||
20 | |||
21 | return; | ||
22 | } |