WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Support transparant gunzipping in the rea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Support transparant gunzipping in the readnotes utility.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Jan 2007 05:35:28 -0800
Delivery-date: Fri, 26 Jan 2007 05:50:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
# Date 1169763412 0
# Node ID 9d1d9877131de3aec3d56b277c03075d7f63f3a1
# Parent  d42878949f63a3614b22c388cb82862b7d3c264e
Support transparant gunzipping in the readnotes utility.

Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx>
---
 tools/xcutils/readnotes.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff -r d42878949f63 -r 9d1d9877131d tools/xcutils/readnotes.c
--- a/tools/xcutils/readnotes.c Thu Jan 25 22:16:52 2007 +0000
+++ b/tools/xcutils/readnotes.c Thu Jan 25 22:16:52 2007 +0000
@@ -11,6 +11,7 @@
 #include <sys/mman.h>
 
 #include <xg_private.h>
+#include <xc_dom.h> /* gunzip bits */
 
 #include <xen/libelf.h>
 
@@ -33,8 +34,8 @@ int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
        const char *f;
-       int fd,h,size,count;
-       void *image;
+       int fd,h,size,usize,count;
+       void *image,*tmp;
        struct stat st;
        struct elf_binary elf;
        const elf_shdr *shdr;
@@ -67,6 +68,15 @@ int main(int argc, char **argv)
                return 1;
        }
        size = st.st_size;
+
+       usize = xc_dom_check_gzip(image, st.st_size);
+       if (usize)
+       {
+               tmp = malloc(size);
+               xc_dom_do_gunzip(image, st.st_size, tmp, size);
+               image = tmp;
+               size = usize;
+       }
 
        if (0 != elf_init(&elf, image, size))
        {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Support transparant gunzipping in the readnotes utility., Xen patchbot-unstable <=