summaryrefslogtreecommitdiffstats
path: root/src/ustar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ustar.c')
-rw-r--r--src/ustar.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ustar.c b/src/ustar.c
index 359f967..669596e 100644
--- a/src/ustar.c
+++ b/src/ustar.c
@@ -280,6 +280,7 @@ int
opkg_opk_ustar_write_header(struct opkg_opk_ustar *ustar,
struct opkg_opk_dirent *dirent, uint16_t mode,
uid_t uid, const char *uname, gid_t gid, const char *gname,
+ uint32_t devmajor, uint32_t devminor,
uint64_t size, uint64_t mtime, char type, const char *linkname)
{
uint32_t chksum;
@@ -302,11 +303,13 @@ opkg_opk_ustar_write_header(struct opkg_opk_ustar *ustar,
* even checking endptr, so we have to NUL-terminate these fields. Also
* parsing these fields with strtol() are our very own
* _opkg_opk_ustar_next() and opkg_opk_ustar_list() above. */
- sprintf(ustar->header.mode, "%07o", mode);
- sprintf(ustar->header.uid, "%07o", uid);
- sprintf(ustar->header.gid, "%07o", gid);
- sprintf(ustar->header.size, "%011o", size);
- sprintf(ustar->header.mtime, "%011o", mtime);
+ sprintf(ustar->header.mode, "%07o", mode);
+ sprintf(ustar->header.uid, "%07o", uid);
+ sprintf(ustar->header.gid, "%07o", gid);
+ sprintf(ustar->header.size, "%011o", size);
+ sprintf(ustar->header.mtime, "%011o", mtime);
+ sprintf(ustar->header.devmajor, "%07o", devmajor);
+ sprintf(ustar->header.devminor, "%07o", devminor);
switch (type) {
case '-': /* Regular file */
*ustar->header.typeflag = '0';