- if (image == WIM_ALL_IMAGES) {
- for (i = 1; i <= wim_info->num_images; i++)
- print_image_info(wim_info, i);
- } else {
- time_t time;
- char *p;
-
- image_info = &wim_info->images[image - 1];
-
- printf("Index: %"PRIu64"\n",
- image_info->index);
- printf("Name: %s\n",
- image_info->name);
-
- /* Always print the Description: part even if there is no
- * description. */
- if (image_info->description)
- desc = image_info->description;
- else
- desc = "";
- printf("Description: %s\n", desc);
-
- if (image_info->display_name)
- printf("Display Name: %s\n",
- image_info->display_name);
-
- if (image_info->display_description)
- printf("Display Description: %s\n",
- image_info->display_description);
-
- printf("Directory Count: %"PRIu64"\n",
- image_info->dir_count);
- printf("File Count: %"PRIu64"\n",
- image_info->file_count);
- printf("Total Bytes: %"PRIu64"\n",
- image_info->total_bytes);
- printf("Hard Link Bytes: %"PRIu64"\n",
- image_info->hard_link_bytes);
-
- time = wim_timestamp_to_unix(image_info->creation_time);
- p = asctime(gmtime(&time));
- *(strrchr(p, '\n')) = '\0';
-
- printf("Creation Time: %s UTC\n", p);
-
- time = wim_timestamp_to_unix(image_info->last_modification_time);
- p = asctime(gmtime(&time));
- *(strrchr(p, '\n')) = '\0';
-
- printf("Last Modification Time: %s UTC\n", p);
- if (image_info->windows_info_exists)
- print_windows_info(&image_info->windows_info);
- if (image_info->flags)
- printf("Flags: %s\n", image_info->flags);
- putchar('\n');
- }
+ image_info = &wim_info->images[image - 1];
+
+ printf("Index: %d\n", image_info->index);
+ printf("Name: %s\n", image_info->name);
+
+ /* Always print the Description: part even if there is no
+ * description. */
+ if (image_info->description)
+ desc = image_info->description;
+ else
+ desc = "";
+ printf("Description: %s\n", desc);
+
+ if (image_info->display_name)
+ printf("Display Name: %s\n",
+ image_info->display_name);
+
+ if (image_info->display_description)
+ printf("Display Description: %s\n",
+ image_info->display_description);
+
+ printf("Directory Count: %"PRIu64"\n", image_info->dir_count);
+ printf("File Count: %"PRIu64"\n", image_info->file_count);
+ printf("Total Bytes: %"PRIu64"\n", image_info->total_bytes);
+ printf("Hard Link Bytes: %"PRIu64"\n", image_info->hard_link_bytes);
+
+ wim_timestamp_to_str(image_info->creation_time, buf, sizeof(buf));
+ printf("Creation Time: %s\n", buf);
+
+ wim_timestamp_to_str(image_info->creation_time, buf, sizeof(buf));
+ printf("Last Modification Time: %s\n", buf);
+ if (image_info->windows_info_exists)
+ print_windows_info(&image_info->windows_info);
+ if (image_info->flags)
+ printf("Flags: %s\n", image_info->flags);
+ putchar('\n');