Fix print part number of total parts in WIM header
authorEric Biggers <ebiggers3@gmail.com>
Fri, 31 Aug 2012 04:03:39 +0000 (23:03 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 31 Aug 2012 04:03:39 +0000 (23:03 -0500)
src/header.c
tests/test-imagex-ntfs

index 1b57dc2..e7dd900 100644 (file)
@@ -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);
index 989be19..6d7fbd5 100755 (executable)
@@ -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