]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
Win32: compile
[wimlib] / programs / imagex.c
index d3588a9e5175f94fc10b393b31d8b0df6fa73b09..c3187f74f94341a4b3bf089c134cde7c31a0c00c 100644 (file)
@@ -1276,10 +1276,10 @@ parse_num_threads(const tchar *optarg)
        }
 }
 
-static uint32_t parse_chunk_size(const char *optarg)
+static uint32_t parse_chunk_size(const tchar *optarg)
 {
-       char *tmp;
-       unsigned long chunk_size = strtoul(optarg, &tmp, 10);
+       tchar *tmp;
+       unsigned long chunk_size = tstrtoul(optarg, &tmp, 10);
        if (chunk_size >= UINT32_MAX || *tmp || tmp == optarg) {
                imagex_error(T("Chunk size must be a non-negative integer!"));
                return UINT32_MAX;
@@ -2794,25 +2794,37 @@ static int
 print_resource(const struct wimlib_resource_entry *resource,
               void *_ignore)
 {
-
-       tprintf(T("Uncompressed size   = %"PRIu64" bytes\n"),
+       tprintf(T("Uncompressed size     = %"PRIu64" bytes\n"),
                resource->uncompressed_size);
+       if (resource->is_partial) {
+               tprintf(T("Raw uncompressed size = %"PRIu64" bytes\n"),
+                       resource->raw_resource_uncompressed_size);
+
+               tprintf(T("Raw compressed size   = %"PRIu64" bytes\n"),
+                       resource->raw_resource_compressed_size);
 
-       tprintf(T("Compressed size     = %"PRIu64" bytes\n"),
-               resource->compressed_size);
+               tprintf(T("Raw offset in WIM     = %"PRIu64" bytes\n"),
+                       resource->raw_resource_offset_in_wim);
 
-       tprintf(T("Offset              = %"PRIu64" bytes\n"),
-               resource->offset);
+               tprintf(T("Offset in raw         = %"PRIu64" bytes\n"),
+                       resource->offset);
+       } else {
+               tprintf(T("Compressed size       = %"PRIu64" bytes\n"),
+                       resource->compressed_size);
+
+               tprintf(T("Offset in WIM         = %"PRIu64" bytes\n"),
+                       resource->offset);
+       }
 
 
-       tprintf(T("Part Number         = %u\n"), resource->part_number);
-       tprintf(T("Reference Count     = %u\n"), resource->reference_count);
+       tprintf(T("Part Number           = %u\n"), resource->part_number);
+       tprintf(T("Reference Count       = %u\n"), resource->reference_count);
 
-       tprintf(T("Hash                = 0x"));
+       tprintf(T("Hash                  = 0x"));
        print_byte_field(resource->sha1_hash, sizeof(resource->sha1_hash));
        tputchar(T('\n'));
 
-       tprintf(T("Flags               = "));
+       tprintf(T("Flags                 = "));
        if (resource->is_compressed)
                tprintf(T("WIM_RESHDR_FLAG_COMPRESSED  "));
        if (resource->is_metadata)