[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] oxenstored: provide options to define xenstored devices



commit 904f8957e4916eb8a3cf3154a5d83db9f5f01d84
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Tue Apr 18 15:42:43 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Thu Apr 20 12:02:55 2017 +0100

    oxenstored: provide options to define xenstored devices
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Release-acked-by: Julien Grall <julien.grall@xxxxxxx>
---
 tools/ocaml/xenstored/define.ml          | 3 ---
 tools/ocaml/xenstored/domains.ml         | 7 +++++--
 tools/ocaml/xenstored/oxenstored.conf.in | 3 +++
 tools/ocaml/xenstored/xenstored.ml       | 4 +++-
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/tools/ocaml/xenstored/define.ml b/tools/ocaml/xenstored/define.ml
index 5a604d1..2965c08 100644
--- a/tools/ocaml/xenstored/define.ml
+++ b/tools/ocaml/xenstored/define.ml
@@ -17,9 +17,6 @@
 let xenstored_major = 1
 let xenstored_minor = 0
 
-let xenstored_proc_kva = "/proc/xen/xsd_kva"
-let xenstored_proc_port = "/proc/xen/xsd_port"
-
 let xs_daemon_socket = Paths.xen_run_stored ^ "/socket"
 let xs_daemon_socket_ro = Paths.xen_run_stored ^ "/socket_ro"
 
diff --git a/tools/ocaml/xenstored/domains.ml b/tools/ocaml/xenstored/domains.ml
index fdae298..4134630 100644
--- a/tools/ocaml/xenstored/domains.ml
+++ b/tools/ocaml/xenstored/domains.ml
@@ -127,11 +127,14 @@ let create xc doms domid mfn port =
        Domain.bind_interdomain dom;
        dom
 
+let xenstored_kva = ref ""
+let xenstored_port = ref ""
+
 let create0 doms =
        let port, interface =
                (
-                       let port = Utils.read_file_single_integer 
Define.xenstored_proc_port
-                       and fd = Unix.openfile Define.xenstored_proc_kva
+                       let port = Utils.read_file_single_integer 
!xenstored_port
+                       and fd = Unix.openfile !xenstored_kva
                                               [ Unix.O_RDWR ] 0o600 in
                        let interface = Xenmmap.mmap fd Xenmmap.RDWR 
Xenmmap.SHARED
                                                  (Xenmmap.getpagesize()) 0 in
diff --git a/tools/ocaml/xenstored/oxenstored.conf.in 
b/tools/ocaml/xenstored/oxenstored.conf.in
index 536611e..6579b84 100644
--- a/tools/ocaml/xenstored/oxenstored.conf.in
+++ b/tools/ocaml/xenstored/oxenstored.conf.in
@@ -69,3 +69,6 @@ persistent = false
 # Perodically scanning all the rings as a safenet for lazy clients.
 # Define the interval in seconds, set to negative to disable.
 # ring-scan-interval = 20
+
+xenstored-kva = @XENSTORED_KVA@
+xenstored-port = @XENSTORED_PORT@
diff --git a/tools/ocaml/xenstored/xenstored.ml 
b/tools/ocaml/xenstored/xenstored.ml
index bb780d0..438afd9 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -118,7 +118,9 @@ let parse_config filename =
                ("access-log-special-ops", Config.Set_bool 
Logging.access_log_special_ops);
                ("allow-debug", Config.Set_bool Process.allow_debug);
                ("ring-scan-interval", Config.Set_int ring_scan_interval);
-               ("pid-file", Config.Set_string pidfile); ] in
+               ("pid-file", Config.Set_string pidfile);
+               ("xenstored-kva", Config.Set_string Domains.xenstored_kva);
+               ("xenstored-port", Config.Set_string Domains.xenstored_port); ] 
in
        begin try Config.read filename options (fun _ _ -> raise Not_found)
        with
        | Config.Error err -> List.iter (fun (k, e) ->
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.