xml.c: Export <ARCH> and <WIMBOOT> nodes correctly
authorEric Biggers <ebiggers3@gmail.com>
Mon, 26 May 2014 23:31:03 +0000 (18:31 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 26 May 2014 23:34:39 +0000 (18:34 -0500)
The XML data still needs to be handled better in general, but this fixes
the bug that this information was missing from clone_image_info().

NEWS
src/xml.c

diff --git a/NEWS b/NEWS
index 6e6704c..b3e0d4d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,8 @@ Version 1.7.0-BETA:
        The 'mkwinpeimg' script now supports writing the ISO image to standard
        output.
 
+       The <ARCH> element in WIM XML data will now be exported correctly.
+
        On Windows, sparse file attributes are no longer set on extracted files.
 
        On UNIX, configuring with --disable-xattr or --enable-xattr is no longer
index 6233462..d0975d9 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -90,6 +90,9 @@ struct image_info {
        tchar *display_description;
        tchar *flags;
        bool wimboot;
+
+       /* Note: must update clone_image_info() if adding new fields here  */
+
        struct wim_lookup_table *lookup_table; /* temporary field */
 };
 
@@ -1001,6 +1004,8 @@ clone_windows_info(const struct windows_info *old, struct windows_info *new)
 {
        int ret;
 
+       new->arch = old->arch;
+
        ret = dup_strings_from_specs(old, new, windows_info_xml_string_specs,
                                     ARRAY_LEN(windows_info_xml_string_specs));
        if (ret)
@@ -1063,6 +1068,7 @@ clone_image_info(const struct image_info *old, struct image_info *new)
                if (ret)
                        return ret;
        }
+       new->wimboot = old->wimboot;
        return 0;
 }