]> wimlib.net Git - wimlib/blobdiff - src/header.c
wimlib_export() updates
[wimlib] / src / header.c
index 1b57dc2dbe4920a455ef202ce67def2f922eb6c1..68ea052628b5a6a1fa7ceb25a8478ebbfcd2ac4d 100644 (file)
@@ -61,7 +61,7 @@ int read_header(FILE *fp, struct wim_header *hdr, int split_ok)
        if (bytes_read != sizeof(u32))
                goto err;
 
-       TO_LE32(hdr_size);
+       hdr_size = le32_to_cpu(hdr_size);
 
        /* Byte 12 */
 
@@ -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);