From b350e1fe2c3fd6614b3e1e79e3c3d933fda7a4e4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 30 Aug 2012 23:03:39 -0500 Subject: [PATCH] Fix print part number of total parts in WIM header --- src/header.c | 4 ++-- tests/test-imagex-ntfs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/header.c b/src/header.c index 1b57dc2d..e7dd9009 100644 --- a/src/header.c +++ b/src/header.c @@ -253,8 +253,8 @@ WIMLIBAPI void wimlib_print_header(const WIMStruct *w) fputs ("GUID = ", stdout); print_byte_field(hdr->guid, WIM_GID_LEN); putchar('\n'); - printf("Part Number = %hu\n", 1); - printf("Total Parts = %hu\n", 1); + printf("Part Number = %hu\n", w->hdr.part_number); + printf("Total Parts = %hu\n", w->hdr.total_parts); printf("Image Count = %u\n", hdr->image_count); printf("Lookup Table Size = %"PRIu64"\n", (u64)hdr->lookup_table_res_entry.size); diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 989be190..6d7fbd5b 100755 --- a/tests/test-imagex-ntfs +++ b/tests/test-imagex-ntfs @@ -10,8 +10,7 @@ set -e cd tests imagex() { - #echo "imagex $@" - ../imagex $@ + ../imagex $@ > /dev/null } __do_unmount() { @@ -237,7 +236,7 @@ do_test 'echo -n 8 > file; ln file hardlink; ln -s hardlink symlink; echo -n 8 > identical file; - dd if=/dev/urandom of=randomfile bs=4096 count=10; + dd if=/dev/urandom of=randomfile bs=4096 count=10 &>/dev/null; mkdir dir; setfattr -n system.ntfs_dos_name -v DOSNAME dir; setfattr -n system.ntfs_acl -v 0s`cat ../security_descriptor_1.base64` dir -- 2.43.0