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-devel

[Xen-devel] [PATCH] when reading / read automatically the root node.

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] when reading / read automatically the root node.
From: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Date: Fri, 10 Sep 2010 16:57:30 +0100
Cc: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Delivery-date: Fri, 10 Sep 2010 08:58:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/ocaml/xenstored/store.ml |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/ocaml/xenstored/store.ml b/tools/ocaml/xenstored/store.ml
index 34552bb..4c9b166 100644
--- a/tools/ocaml/xenstored/store.ml
+++ b/tools/ocaml/xenstored/store.ml
@@ -300,7 +300,12 @@ let read store perm path =
                Node.check_perm ent perm Perms.READ;
                ent.Node.value
        in
-       Path.apply store.root path do_read
+       if path = [] then (
+               let ent = store.root in
+               Node.check_perm ent perm Perms.READ;
+               ent.Node.value
+       ) else
+               Path.apply store.root path do_read
 
 let ls store perm path =
        let children =
-- 
1.7.1


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] when reading / read automatically the root node., Vincent Hanquez <=