From 916c8f6e26140cf3c03e58726b57dc4f86e18316 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 22 Oct 2021 17:19:34 +0200 Subject: Cleanup: remove struct stat from libtar The idea was originally to use struct stat in the libfstree code, so we can simply hose data read from a directory into the fstree_t. The struct was then also used with libtar, for simpler interoperation, but it turned out to introduce a lot of platform quirks and causes more trouble than it's worth. Signed-off-by: David Oberhollenzer --- tests/libtar/tar_xattr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/libtar/tar_xattr.c') diff --git a/tests/libtar/tar_xattr.c b/tests/libtar/tar_xattr.c index 633c3a2..877bfba 100644 --- a/tests/libtar/tar_xattr.c +++ b/tests/libtar/tar_xattr.c @@ -18,11 +18,10 @@ int main(int argc, char **argv) fp = istream_open_file(STRVALUE(TESTPATH) "/" STRVALUE(TESTFILE)); TEST_NOT_NULL(fp); TEST_ASSERT(read_header(fp, &hdr) == 0); - TEST_EQUAL_UI(hdr.sb.st_mode, S_IFREG | 0644); - TEST_EQUAL_UI(hdr.sb.st_uid, 01750); - TEST_EQUAL_UI(hdr.sb.st_gid, 01750); - TEST_EQUAL_UI(hdr.sb.st_size, 5); - TEST_EQUAL_UI(hdr.sb.st_mtime, 1543094477); + TEST_EQUAL_UI(hdr.mode, S_IFREG | 0644); + TEST_EQUAL_UI(hdr.uid, 01750); + TEST_EQUAL_UI(hdr.gid, 01750); + TEST_EQUAL_UI(hdr.actual_size, 5); TEST_EQUAL_UI(hdr.mtime, 1543094477); TEST_STR_EQUAL(hdr.name, "input.txt"); TEST_ASSERT(!hdr.unknown_record); -- cgit v1.2.3