[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.9 v2 2/3] oxenstored: provide options to define xenstored devices
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- 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 5a604d1bea..2965c08534 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 fdae298613..4134630c58 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 536611e8d0..6579b84448 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 bb780d0459..33cff5f446 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) -> -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |