projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Patch from Konstantin Isakov <ikm@pisem.net>:
[oweals/busybox.git]
/
archival
/
libunarchive
/
data_align.c
1
#include <errno.h>
2
#include <sys/types.h>
3
#include <unistd.h>
4
#include "unarchive.h"
5
#include "libbb.h"
6
7
extern const unsigned short data_align(const int src_fd, const unsigned int offset, const unsigned short align_to)
8
{
9
const unsigned short skip_amount = (align_to - (offset % align_to)) % align_to;
10
seek_sub_file(src_fd, skip_amount);
11
12
return(skip_amount);
13
}