Tweak XML element order and time format
authorEric Biggers <ebiggers3@gmail.com>
Sat, 24 Nov 2012 03:37:26 +0000 (21:37 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 24 Nov 2012 03:37:26 +0000 (21:37 -0600)
src/xml.c

index d6c6655..9a0bded 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -621,13 +621,6 @@ static int xml_write_windows_info(xmlTextWriter *writer,
                        return rc;
        }
 
-       if (windows_info->system_root) {
-               rc = xmlTextWriterWriteElement(writer, "SYSTEMROOT",
-                                               windows_info->system_root);
-                       if (rc < 0)
-                               return rc;
-       }
-
        if (windows_info->product_type) {
                rc = xmlTextWriterWriteElement(writer, "PRODUCTTYPE",
                                                windows_info->product_type);
@@ -669,6 +662,13 @@ static int xml_write_windows_info(xmlTextWriter *writer,
                        return rc;
        }
 
+       if (windows_info->system_root) {
+               rc = xmlTextWriterWriteElement(writer, "SYSTEMROOT",
+                                               windows_info->system_root);
+                       if (rc < 0)
+                               return rc;
+       }
+
        return xmlTextWriterEndElement(writer); /* </WINDOWS> */
 }
 
@@ -682,12 +682,12 @@ static int xml_write_time(xmlTextWriter *writer, const char *element_name,
                return rc;
 
        rc = xmlTextWriterWriteFormatElement(writer, "HIGHPART",
-                                       "0x%"PRIX32, (u32)(time >> 32));
+                                            "0x%08"PRIX32, (u32)(time >> 32));
        if (rc < 0)
                return rc;
 
        rc = xmlTextWriterWriteFormatElement(writer, "LOWPART",
-                                               "0x%"PRIX32, (u32)time);
+                                            "0x%08"PRIX32, (u32)time);
        if (rc < 0)
                return rc;