| /tools/helpers/ |
| A D | init-dom0less.c | 76 if (!xs_write(xsh, t, full_path, val, strlen(val))) in do_xs_write_dom() 114 static int create_xenstore(struct xs_handle *xsh, in create_xenstore() argument 170 t = xs_transaction_start(xsh); in create_xenstore() 189 if (!do_xs_write_dom(xsh, t, domid, cpu_str, in create_xenstore() 224 if (!xs_transaction_end(xsh, t, false)) { in create_xenstore() 234 xs_transaction_end(xsh, t, true); in create_xenstore() 238 static int init_domain(struct xs_handle *xsh, in init_domain() argument 315 return xs_is_domain_introduced(xsh, domid); in domain_exists() 323 struct xs_handle *xsh = NULL; in main() local 328 xsh = xs_open(0); in main() [all …]
|
| A D | xen-init-dom0.c | 46 struct xs_handle *xsh = NULL; in main() local 61 xsh = xs_open(0); in main() 62 if (!xsh) { in main() 76 domid_string = xs_read(xsh, XBT_NULL, DOMID_PATH, NULL); in main() 77 domname_string = xs_read(xsh, XBT_NULL, DOMNAME_PATH, NULL); in main() 109 if (!xs_write(xsh, XBT_NULL, DOMID_PATH, "0", strlen("0"))) { in main() 115 if (!xs_write(xsh, XBT_NULL, DOMNAME_PATH, "Domain-0", in main() 140 if (!xs_write(xsh, XBT_NULL, pool_path, pool_name, in main() 159 xs_close(xsh); in main()
|
| A D | init-xenstore-domain.c | 418 if ( !xs_write(xsh, XBT_NULL, path, val, strlen(val)) ) in do_xs_write() 427 do_xs_write(xsh, full_path, val); in do_xs_write_dom() 434 struct xs_handle *xsh; in main() local 529 xsh = xs_open(0); in main() 530 if ( !xsh ) in main() 537 do_xs_write(xsh, "/tool/xenstored/domid", buf); in main() 538 do_xs_write_dom(xsh, "domid", buf); in main() 539 do_xs_write_dom(xsh, "name", name); in main() 541 do_xs_write_dom(xsh, "memory/target", buf); in main() 544 do_xs_write_dom(xsh, "memory/static-max", buf); in main() [all …]
|
| /tools/tests/xenstore/ |
| A D | test-xenstore.c | 50 static struct xs_handle *xsh; variable 79 xs_rm(xsh, XBT_NULL, path); in call_test() 266 if ( !xs_rm(xsh, XBT_NULL, path) ) in test_rm() 347 xs_transaction_end(xsh, t, true); in test_ta2() 368 t = xs_transaction_start(xsh); in test_ta3() 399 xs_transaction_end(xsh, t, true); in test_ta3() 430 xs_rm(xsh, XBT_NULL, path); in cleanup() 440 xs_rm(xsh, t, TEST_PATH); in cleanup() 497 xsh = xs_open(0); in main() 498 if ( !xsh ) in main() [all …]
|
| /tools/xs-clients/ |
| A D | xenstore_control.c | 215 rc = send_kernel_blob(xsh, binary); in live_update_stubdom() 220 rc = live_update_cmdline(xsh, cmdline); in live_update_stubdom() 225 rc = live_update_start(xsh, force, to, vers); in live_update_stubdom() 232 xs_control_command(xsh, "live-update", "-a", 3); in live_update_stubdom() 266 rc = live_update_cmdline(xsh, cmdline); in live_update_daemon() 271 rc = live_update_start(xsh, force, to, vers); in live_update_daemon() 341 struct xs_handle *xsh; in main() local 354 xsh = xs_open(0); in main() 355 if (xsh == NULL) { in main() 362 rc = live_update(xsh, argc - 2, argv + 2); in main() [all …]
|
| A D | xenstore_client.c | 255 if (xs_rm(xsh, xth, path)) { in do_rm() 435 vec = xs_read_watch(xsh, &num); in do_watch() 522 if (do_rm(path, xsh, xth)) { in perform() 626 if (!xs_watch(xsh, w, w)) in perform() 629 do_watch(xsh, nr_watches); in perform() 665 struct xs_handle *xsh; in main() local 808 xsh = xs_open(0); in main() 809 if (xsh == NULL) err(1, "xs_open"); in main() 813 xth = xs_transaction_start(xsh); in main() 834 if (xsh) in main() [all …]
|
| /tools/ocaml/libs/xs/ |
| A D | xst.ml | 31 let get_operations tid xsh = { 33 read = (fun path -> Xsraw.read tid path xsh); 34 readv = (fun dir vec -> Xsraw.readv tid dir vec xsh); 37 mkdir = (fun path -> Xsraw.mkdir tid path xsh); 38 rm = (fun path -> Xsraw.rm tid path xsh); 39 getperms = (fun path -> Xsraw.getperms tid path xsh); 44 let transaction xsh (f: ops -> 'a) : 'a = 48 let tid = Xsraw.transaction_start xsh in 49 let t = get_operations tid xsh in 54 ignore (Xsraw.transaction_end tid false xsh); [all …]
|
| A D | xs.ml | 21 type xsh = type 64 let transaction xsh = Xst.transaction xsh.con 66 let has_watchevents xsh = Xsraw.has_watchevents xsh.con 67 let get_watchevent xsh = Xsraw.get_watchevent xsh.con 69 let read_watchevent xsh = Xsraw.read_watchevent xsh.con 72 let get_fd xsh = Xenbus.Xb.get_fd xsh.con.Xsraw.xb 99 let fd = get_fd xsh in 133 if Xsraw.has_watchevents xsh.con 139 let monitor_paths xsh l time callback = 142 List.iter (fun (w,v) -> xsh.watch w v) l; [all …]
|
| A D | xs.mli | 32 type xsh = { type 55 val get_operations : con -> xsh 59 val transaction : xsh -> (Xst.ops -> 'a) -> 'a 62 val has_watchevents : xsh -> bool 63 val get_watchevent : xsh -> string * string 64 val read_watchevent : xsh -> string * string 68 val get_fd : xsh -> Unix.file_descr 77 val monitor_paths : xsh 84 val daemon_open : unit -> xsh 87 val domain_open : unit -> xsh [all …]
|
| /tools/libs/light/ |
| A D | libxl_xshelp.c | 117 ok = xs_write(ctx->xsh, t, path, s, strlen(s)); in libxl__xs_vprintf() 144 ptr = xs_read(ctx->xsh, t, path, NULL); in libxl__xs_read() 152 char *s = xs_get_domain_path(ctx->xsh, domid); in libxl__xs_get_dompath() 166 ret = xs_directory(ctx->xsh, t, path, nb); in libxl__xs_directory() 178 ok = xs_write(ctx->xsh, t, path, "", 0); in libxl__xs_mknod() 238 if (!xs_rm(CTX->xsh, t, path)) { in libxl__xs_rm_checked() 251 *t = xs_transaction_start(CTX->xsh); in libxl__xs_transaction_start() 263 if (!xs_transaction_end(CTX->xsh, *t, 0)) { in libxl__xs_transaction_commit() 281 if (!xs_transaction_end(CTX->xsh, *t, 1)) in libxl__xs_transaction_abort() 298 if (!xs_rm(CTX->xsh, t, path)) { in libxl__xs_path_cleanup() [all …]
|
| A D | libxl_vdispl.c | 98 while ((connector = xs_read(ctx->xsh, XBT_NULL, connector_path, NULL)) != in libxl__device_vdispl_getconnectors() 112 info->connectors[i].unique_id = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 116 value = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 128 value = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 133 value = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 138 value = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 143 value = xs_read(ctx->xsh, XBT_NULL, value_path, NULL); in libxl__device_vdispl_getconnectors() 171 info->backend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vdispl_getinfo() 182 info->frontend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vdispl_getinfo()
|
| A D | libxl_cpupool.c | 175 t = xs_transaction_start(ctx->xsh); in libxl_cpupool_create() 177 xs_mkdir(ctx->xsh, t, GCSPRINTF("/local/pool/%d", *poolid)); in libxl_cpupool_create() 185 if (xs_transaction_end(ctx->xsh, t, 0) || (errno != EAGAIN)) { in libxl_cpupool_create() 233 t = xs_transaction_start(ctx->xsh); in libxl_cpupool_destroy() 235 xs_rm(ctx->xsh, XBT_NULL, GCSPRINTF("/local/pool/%d", poolid)); in libxl_cpupool_destroy() 237 if (xs_transaction_end(ctx->xsh, t, 0) || (errno != EAGAIN)) in libxl_cpupool_destroy() 272 t = xs_transaction_start(ctx->xsh); in libxl_cpupool_rename() 278 if (xs_transaction_end(ctx->xsh, t, 0)) in libxl_cpupool_rename()
|
| A D | libxl_pci.c | 116 xs_rm(ctx->xsh, t, be_path); in libxl__create_pci_backend() 117 xs_mkdir(ctx->xsh, t, be_path); in libxl__create_pci_backend() 131 xs_rm(ctx->xsh, t, fe_path); in libxl__create_pci_backend() 132 xs_mkdir(ctx->xsh, t, fe_path); in libxl__create_pci_backend() 271 t = xs_transaction_start(ctx->xsh); in libxl__device_pci_remove_xenstore() 286 t = xs_transaction_start(ctx->xsh); in libxl__device_pci_remove_xenstore() 299 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 303 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 307 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 312 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() [all …]
|
| A D | libxl_fork.c | 620 if (CTX->xsh) { in libxl__ev_child_fork() 621 xs_daemon_destroy_postfork(CTX->xsh); in libxl__ev_child_fork() 622 CTX->xsh = NULL; /* turns mistakes into crashes */ in libxl__ev_child_fork() 667 assert(!CTX->xsh); in libxl__ev_child_xenstore_reopen() 668 CTX->xsh = xs_open(0); in libxl__ev_child_xenstore_reopen() 669 if (!CTX->xsh) { in libxl__ev_child_xenstore_reopen() 674 libxl_fd_set_cloexec(CTX, xs_fileno(CTX->xsh), 1); in libxl__ev_child_xenstore_reopen()
|
| A D | libxl_vsnd.c | 158 stream->unique_id = xs_read(CTX->xsh, XBT_NULL, in libxl__stream_from_xenstore() 191 pcm->name = xs_read(CTX->xsh, XBT_NULL, in libxl__pcm_from_xenstore() 248 vsnd->short_name = xs_read(CTX->xsh, XBT_NULL, in libxl__vsnd_from_xenstore() 252 vsnd->long_name = xs_read(CTX->xsh, XBT_NULL, in libxl__vsnd_from_xenstore() 608 info->backend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vsnd_getinfo() 614 val = xs_read(ctx->xsh, XBT_NULL, GCSPRINTF("%s/state", devpath), NULL); in libxl_device_vsnd_getinfo() 618 info->frontend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vsnd_getinfo()
|
| A D | libxl_mem.c | 117 t = xs_transaction_start(ctx->xsh); in libxl__fill_dom0_memory_info() 169 if (!xs_transaction_end(ctx->xsh, t, 0)) { in libxl__fill_dom0_memory_info() 221 t = xs_transaction_start(ctx->xsh); in libxl_set_memory_target() 225 if (!xs_transaction_end(ctx->xsh, t, 1)) { in libxl_set_memory_target() 342 if (!xs_transaction_end(ctx->xsh, t, abort_transaction) in libxl_set_memory_target()
|
| A D | libxl_domain.c | 54 trans = our_trans = xs_transaction_start(ctx->xsh); in libxl__domain_rename() 105 if (!xs_write(ctx->xsh, trans, name_path, in libxl__domain_rename() 137 if (!xs_transaction_end(ctx->xsh, our_trans, 0)) { in libxl__domain_rename() 252 t = xs_transaction_start(ctx->xsh); in libxl_domain_preserve() 254 xs_rm(ctx->xsh, t, vm_path); in libxl_domain_preserve() 255 xs_mkdir(ctx->xsh, t, vm_path); in libxl_domain_preserve() 267 if (!xs_transaction_end(ctx->xsh, t, 0)) in libxl_domain_preserve() 1534 if (!xs_rm(ctx->xsh, XBT_NULL, vm_path)) in devices_destroy_cb() 1537 if (!xs_rm(ctx->xsh, XBT_NULL, dom_path)) in devices_destroy_cb() 1734 t = xs_transaction_start(CTX->xsh); in libxl__set_vcpuonline_xenstore() [all …]
|
| A D | libxl_vkb.c | 118 …vkb->unique_id = xs_read(CTX->xsh, XBT_NULL, GCSPRINTF("%s/"XENKBD_FIELD_UNIQUE_ID, be_path), NULL… in libxl__vkb_from_xenstore() 300 info->backend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vkb_getinfo() 311 info->frontend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vkb_getinfo()
|
| A D | libxl_vtpm.c | 108 vtpminfo->backend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vtpm_getinfo() 130 vtpminfo->frontend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_vtpm_getinfo()
|
| A D | libxl_device.c | 181 t = xs_transaction_start(ctx->xsh); in libxl__device_generic_add() 204 if (!xs_rm(ctx->xsh, t, frontend_path) && errno != ENOENT) in libxl__device_generic_add() 206 if (!xs_mkdir(ctx->xsh, t, frontend_path)) in libxl__device_generic_add() 215 if (!xs_set_permissions(ctx->xsh, t, frontend_path, in libxl__device_generic_add() 219 if (!xs_set_permissions(ctx->xsh, t, frontend_path, in libxl__device_generic_add() 223 if (!xs_write(ctx->xsh, t, GCSPRINTF("%s/backend", frontend_path), in libxl__device_generic_add() 240 if (!xs_rm(ctx->xsh, t, backend_path) && errno != ENOENT) in libxl__device_generic_add() 242 if (!xs_mkdir(ctx->xsh, t, backend_path)) in libxl__device_generic_add() 244 if (!xs_set_permissions(ctx->xsh, t, backend_path, backend_perms, in libxl__device_generic_add() 247 if (!xs_write(ctx->xsh, t, GCSPRINTF("%s/frontend", backend_path), in libxl__device_generic_add() [all …]
|
| A D | libxl_create.c | 801 t = xs_transaction_start(ctx->xsh); in libxl__domain_make() 803 xs_rm(ctx->xsh, t, dom_path); in libxl__domain_make() 806 xs_rm(ctx->xsh, t, vm_path); in libxl__domain_make() 809 xs_rm(ctx->xsh, t, libxl_path); in libxl__domain_make() 814 xs_write(ctx->xsh, t, GCSPRINTF("%s/vm", dom_path), vm_path, strlen(vm_path)); in libxl__domain_make() 903 xs_write(ctx->xsh, t, GCSPRINTF("%s/uuid", vm_path), uuid_string, strlen(uuid_string)); in libxl__domain_make() 904 xs_write(ctx->xsh, t, GCSPRINTF("%s/name", vm_path), info->name, strlen(info->name)); in libxl__domain_make() 913 xs_write(ctx->xsh, t, GCSPRINTF("%s/type", libxl_path), dom_type, in libxl__domain_make() 916 if (!xs_transaction_end(ctx->xsh, t, 0)) { in libxl__domain_make() 927 if (t) xs_transaction_end(ctx->xsh, t, 1); in libxl__domain_make() [all …]
|
| A D | libxl_dom.c | 363 xs_domid = xs_read(ctx->xsh, XBT_NULL, "/tool/xenstored/domid", NULL); in libxl__build_pre() 367 con_domid = xs_read(ctx->xsh, XBT_NULL, "/tool/xenconsoled/domid", NULL); in libxl__build_pre() 486 vm_path = xs_read(ctx->xsh, XBT_NULL, GCSPRINTF("%s/vm", dom_path), NULL); in libxl__build_post() 488 t = xs_transaction_start(ctx->xsh); in libxl__build_post() 494 if (!xs_transaction_end(ctx->xsh, t, 0)) in libxl__build_post() 501 if (xs_get_features_supported(ctx->xsh, &features) && in libxl__build_post() 502 !xs_set_features_domain(ctx->xsh, domid, in libxl__build_post() 510 xs_introduce_domain(ctx->xsh, domid, state->store_mfn, state->store_port); in libxl__build_post()
|
| /tools/libs/store/ |
| A D | xs.c | 390 struct xs_handle *xsh = NULL; in xs_open() local 392 xsh = get_handle(xs_daemon_socket()); in xs_open() 394 if (!xsh) in xs_open() 395 xsh = get_handle(xs_domain_dev()); in xs_open() 397 if (xsh && (flags & XS_UNWATCH_FILTER)) in xs_open() 398 xsh->unwatch_filter = true; in xs_open() 400 return xsh; in xs_open() 459 void xs_close(struct xs_handle *xsh) in xs_close() argument 461 if (xsh) in xs_close() 462 xs_daemon_close(xsh); in xs_close()
|
| /tools/xl/ |
| A D | xl_info.c | 339 struct xs_handle *xsh; in output_xenstore_info() local 342 xsh = xs_open(0); in output_xenstore_info() 343 if (!xsh) { in output_xenstore_info() 349 xs_get_features_supported(xsh, &features); in output_xenstore_info() 353 xs_close(xsh); in output_xenstore_info()
|
| /tools/include/ |
| A D | xenstore.h | 76 void xs_close(struct xs_handle *xsh /* NULL ok */);
|