Alex Nelson
2011-Aug-16 04:50 UTC
[Libguestfs] [PATCH] 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 at cs.ucsc.edu> --- xml/hivexml.c | 4 ++++ 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); -- 1.7.6
Richard W.M. Jones
2011-Aug-16 07:35 UTC
[Libguestfs] [PATCH] hivexml: Add root attribute to the root node
On Mon, Aug 15, 2011 at 09:50:28PM -0700, Alex? Nelson wrote:> New feature: If the root node of the XML root is the hive root node, > denote with attribute/value root="1".ACKed and pushed, thanks. By the way, your email client is adding a U+200E character (Unicode LEFT-TO-RIGHT MARK) in your email address. I keep having to edit it out of commits. It would be very helpful if you could remove it, assuming it's not there for some nefarious purpose ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Seemingly Similar Threads
- [Hivex] [PATCH v3] Report last-modified time of hive root and nodes
- [PATCH 6/7] hivexml: Report attributes in values instead of text.
- [PATCH v6] hivexml: Add byte run reporting functions
- [PATCH] hivexml
- [PATCH] Report last-modified time of hive root and nodes