summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Nelson <ajnelson@cs.ucsc.edu>2011-08-15 21:50:28 -0700
committerRichard W.M. Jones <rjones@redhat.com>2011-08-16 08:32:44 +0100
commitacf63fb7ead29a09b499a73865efdd3e26833da1 (patch)
tree3d812ea986f07f571e8543d1e5dc037e43cbecb9
parent7cc9be00d446df95eaa0bebfc9892a69d3393227 (diff)
downloadhivex-acf63fb7ead29a09b499a73865efdd3e26833da1.tar.gz
hivex-acf63fb7ead29a09b499a73865efdd3e26833da1.tar.xz
hivex-acf63fb7ead29a09b499a73865efdd3e26833da1.zip
hivexml: Add root attribute to the root node
New feature: If the root node of the XML root is the hive root node, denote with attribute/value root="1". Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>
-rw-r--r--xml/hivexml.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xml/hivexml.c b/xml/hivexml.c
index 2967ac9..f29c80c 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@ -204,6 +204,10 @@ node_start (hive_h *h, void *writer_v, hive_node_h node, const char *name)
XML_CHECK (xmlTextWriterStartElement, (writer, BAD_CAST "node"));
XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "name", BAD_CAST name));
+ if (node == hivex_root (h)) {
+ XML_CHECK (xmlTextWriterWriteAttribute, (writer, BAD_CAST "root", BAD_CAST "1"));
+ }
+
last_modified = hivex_node_timestamp (h, node);
if (last_modified >= 0) {
timebuf = filetime_to_8601 (last_modified);