]> wimlib.net Git - wimlib/blobdiff - src/xml.c
print_image_info(): Print last modification time correctly
[wimlib] / src / xml.c
index 23a088e74de2320963091d7e5718cab4ce7c7b2b..19cf5f327a0f8698d5534a9db4d1698bce5f85c7 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -78,6 +78,7 @@ struct image_info {
        tchar *display_name;
        tchar *display_description;
        tchar *flags;
+       struct wim_lookup_table *lookup_table; /* temporary field */
 };
 
 struct xml_string_spec {
@@ -1078,7 +1079,7 @@ calculate_dentry_statistics(struct wim_dentry *dentry, void *arg)
         * link bytes", and this size is multiplied by the link count (NOT one
         * less than the link count).
         */
-       lte = inode_unnamed_lte_resolved(inode);
+       lte = inode_unnamed_lte(inode, info->lookup_table);
        if (lte) {
                info->total_bytes += wim_resource_size(lte);
                if (!dentry_is_first_in_inode(dentry))
@@ -1088,7 +1089,7 @@ calculate_dentry_statistics(struct wim_dentry *dentry, void *arg)
        if (inode->i_nlink >= 2 && dentry_is_first_in_inode(dentry)) {
                for (unsigned i = 0; i < inode->i_num_ads; i++) {
                        if (inode->i_ads_entries[i].stream_name_nbytes) {
-                               lte = inode_stream_lte_resolved(inode, i + 1);
+                               lte = inode_stream_lte(inode, i + 1, info->lookup_table);
                                if (lte) {
                                        info->hard_link_bytes += inode->i_nlink *
                                                                 wim_resource_size(lte);
@@ -1119,6 +1120,7 @@ xml_update_image_info(WIMStruct *w, int image)
        image_info->dir_count       = 0;
        image_info->total_bytes     = 0;
        image_info->hard_link_bytes = 0;
+       image_info->lookup_table = w->lookup_table;
 
        for_dentry_in_tree(w->image_metadata[image - 1]->root_dentry,
                           calculate_dentry_statistics,
@@ -1209,7 +1211,7 @@ print_image_info(const struct wim_info *wim_info, int image)
        wim_timestamp_to_str(image_info->creation_time, buf, sizeof(buf));
        tprintf(T("Creation Time:          %"TS"\n"), buf);
 
-       wim_timestamp_to_str(image_info->creation_time, buf, sizeof(buf));
+       wim_timestamp_to_str(image_info->last_modification_time, buf, sizeof(buf));
        tprintf(T("Last Modification Time: %"TS"\n"), buf);
        if (image_info->windows_info_exists)
                print_windows_info(&image_info->windows_info);
@@ -1236,7 +1238,7 @@ libxml_global_cleanup()
  * Reads the XML data from a WIM file.
  */
 int
-read_xml_data(filedes_t in_fd,
+read_xml_data(int in_fd,
              const struct resource_entry *res_entry,
              struct wim_info **info_ret)
 {