From 7c30e1432bafd2c8065dddcdb99a46e64e997b18 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 12 May 2023 11:33:10 -0400 Subject: ustar: Support writing device major and minor --- (limited to 'src/opk') diff --git a/src/opk/write.c b/src/opk/write.c index 7940222..b9e50c7 100644 --- a/src/opk/write.c +++ b/src/opk/write.c @@ -150,7 +150,7 @@ _opkg_opk_opk_write_dir_read(struct opkg_opk_opk *opk, if (opkg_opk_ustar_write_header(opk->inner_ustar, &child, st.st_mode & 0777, - uid, uname, gid, gname, 0, + uid, uname, gid, gname, 0, 0, 0, opk->mtime, 'd', NULL) != OPKG_OPK_OK) { fputs(_("Error: Failed to write header\n"), @@ -177,7 +177,7 @@ _opkg_opk_opk_write_dir_read(struct opkg_opk_opk *opk, link[link_len] = '\0'; if (opkg_opk_ustar_write_header(opk->inner_ustar, &child, 0777, - uid, uname, gid, gname, 0, + uid, uname, gid, gname, 0, 0, 0, opk->mtime, 'l', link) != OPKG_OPK_OK) { fputs(_("Error: Failed to write header\n"), @@ -195,7 +195,7 @@ _opkg_opk_opk_write_dir_read(struct opkg_opk_opk *opk, if (opkg_opk_ustar_write_header(opk->inner_ustar, &child, st.st_mode & 0777, - uid, uname, gid, gname, + uid, uname, gid, gname, 0, 0, st.st_size, opk->mtime, '-', NULL) != OPKG_OPK_OK) { @@ -316,7 +316,7 @@ _opkg_opk_opk_build_inner_archive(struct opkg_opk_opk *opk, gname = getgrgid(gid)->gr_name; if (opkg_opk_ustar_write_header(opk->inner_ustar, &dirent, st.st_mode & 0777, uid, uname, gid, gname, 0, - opk->mtime, 'd', NULL) != OPKG_OPK_OK) { + 0, 0, opk->mtime, 'd', NULL) != OPKG_OPK_OK) { fputs(_("Error: Failed to write header\n"), stderr); goto err3; @@ -341,7 +341,7 @@ _opkg_opk_opk_build_inner_archive(struct opkg_opk_opk *opk, dirent.name = OPKG_OPK_OPK_ARCHIVE_NAMES_[archive_type]; dirent.parent = NULL; if (opkg_opk_ustar_write_header(opk->outer_ustar, &dirent, 0644, - 0, opk->outer_uname, 0, opk->outer_gname, + 0, opk->outer_uname, 0, opk->outer_gname, 0, 0, written, opk->mtime, '-', NULL) != OPKG_OPK_OK) { fputs(_("Error: Failed to write header\n"), stderr); @@ -440,7 +440,7 @@ opkg_opk_opk_write(struct opkg_opk_opk *opk, const char *file_name) dirent.name = "debian-binary"; dirent.parent = NULL; if (opkg_opk_ustar_write_header(opk->outer_ustar, &dirent, 0644, - 0, opk->outer_uname, 0, opk->outer_gname, + 0, opk->outer_uname, 0, opk->outer_gname, 0, 0, 4, opk->mtime, '-', NULL) != OPKG_OPK_OK) { fputs(_("Error: Failed to write header\n"), stderr); ret = OPKG_OPK_ERROR; -- cgit v0.9.1