aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/xenstored
diff options
context:
space:
mode:
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>2010-09-10 19:01:31 +0100
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>2010-09-10 19:01:31 +0100
commitc528148dd32190ab302e602384a63d4519eaba86 (patch)
treede1adc4f98473a9a4adeff9560e1f2d58721e085 /tools/ocaml/xenstored
parenta48b2967f975fcd8e1edf8a9cc9f1ef004992825 (diff)
downloadxen-c528148dd32190ab302e602384a63d4519eaba86.tar.gz
xen-c528148dd32190ab302e602384a63d4519eaba86.tar.bz2
xen-c528148dd32190ab302e602384a63d4519eaba86.zip
oxenstored: when reading / read automatically the root node.
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Diffstat (limited to 'tools/ocaml/xenstored')
-rw-r--r--tools/ocaml/xenstored/store.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/ocaml/xenstored/store.ml b/tools/ocaml/xenstored/store.ml
index 34552bb9d3..4c9b1663e6 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 =