/xen/tools/tests/xenstore/ |
A D | xs-test.c | 49 static struct xs_handle *xsh; variable 78 xs_rm(xsh, XBT_NULL, path); in call_test() 265 if ( !xs_rm(xsh, XBT_NULL, path) ) in test_rm() 346 xs_transaction_end(xsh, t, true); in test_ta2() 367 t = xs_transaction_start(xsh); in test_ta3() 398 xs_transaction_end(xsh, t, true); in test_ta3() 429 xs_rm(xsh, XBT_NULL, path); in cleanup() 439 xs_rm(xsh, t, TEST_PATH); in cleanup() 493 xsh = xs_open(0); in main() 494 if ( !xsh ) in main() [all …]
|
/xen/tools/helpers/ |
A D | init-xenstore-domain.c | 333 do_xs_write(xsh, full_path, val); in do_xs_write_dir_node() 341 do_xs_write(xsh, full_path, val); in do_xs_write_dom() 348 struct xs_handle *xsh; in main() local 423 xsh = xs_open(0); in main() 424 if ( !xsh ) in main() 430 do_xs_write(xsh, "/tool/xenstored/domid", buf); in main() 431 do_xs_write_dom(xsh, "domid", buf); in main() 432 do_xs_write_dom(xsh, "name", name); in main() 434 do_xs_write_dom(xsh, "memory/target", buf); in main() 452 do_xs_write_dir_node(xsh, fe_path, "tty", ""); in main() [all …]
|
A D | xen-init-dom0.c | 44 struct xs_handle *xsh = NULL; in main() local 56 xsh = xs_open(0); in main() 57 if (!xsh) { in main() 71 domid_string = xs_read(xsh, XBT_NULL, DOMID_PATH, NULL); in main() 72 domname_string = xs_read(xsh, XBT_NULL, DOMNAME_PATH, NULL); in main() 104 if (!xs_write(xsh, XBT_NULL, DOMID_PATH, "0", strlen("0"))) { in main() 110 if (!xs_write(xsh, XBT_NULL, DOMNAME_PATH, "Domain-0", in main() 122 xs_close(xsh); in main()
|
/xen/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 …]
|
/xen/tools/xenstore/ |
A D | xenstore_client.c | 124 if (xs_rm(xsh, xth, path)) { in do_rm() 304 vec = xs_read_watch(xsh, &num); in do_watch() 389 if (do_rm(path, xsh, xth)) { in perform() 417 if (do_rm(path, xsh, xth)) { in perform() 492 if (!xs_watch(xsh, w, w)) in perform() 495 do_watch(xsh, nr_watches); in perform() 531 struct xs_handle *xsh; in main() local 679 if (xsh == NULL) err(1, "xs_open"); in main() 683 xth = xs_transaction_start(xsh); in main() 704 if (xsh) in main() [all …]
|
A D | xenstore_control.c | 10 struct xs_handle *xsh; in main() local 39 xsh = xs_open(0); in main() 40 if (xsh == NULL) { in main() 46 ret = xs_control_command(xsh, argv[1], par, len); in main() 50 ret = xs_control_command(xsh, "help", NULL, 0); in main() 62 xs_close(xsh); in main()
|
A D | xs.c | 315 struct xs_handle *xsh = NULL; in xs_open() local 318 xsh = get_handle(xs_daemon_socket_ro()); in xs_open() 320 xsh = get_handle(xs_daemon_socket()); in xs_open() 322 if (!xsh && !(flags & XS_OPEN_SOCKETONLY)) in xs_open() 323 xsh = get_handle(xs_domain_dev()); in xs_open() 325 if (xsh && (flags & XS_UNWATCH_FILTER)) in xs_open() 326 xsh->unwatch_filter = true; in xs_open() 328 return xsh; in xs_open() 385 void xs_close(struct xs_handle* xsh) in xs_close() argument 387 if (xsh) in xs_close() [all …]
|
/xen/tools/libxl/ |
A D | libxl_xshelp.c | 112 ok = xs_write(ctx->xsh, t, path, s, strlen(s)); in libxl__xs_vprintf() 139 ptr = xs_read(ctx->xsh, t, path, NULL); in libxl__xs_read() 147 char *s = xs_get_domain_path(ctx->xsh, domid); in libxl__xs_get_dompath() 161 ret = xs_directory(ctx->xsh, t, path, nb); in libxl__xs_directory() 173 ok = xs_write(ctx->xsh, t, path, "", 0); in libxl__xs_mknod() 233 if (!xs_rm(CTX->xsh, t, path)) { in libxl__xs_rm_checked() 246 *t = xs_transaction_start(CTX->xsh); in libxl__xs_transaction_start() 258 if (!xs_transaction_end(CTX->xsh, *t, 0)) { in libxl__xs_transaction_commit() 276 if (!xs_transaction_end(CTX->xsh, *t, 1)) in libxl__xs_transaction_abort() 293 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_exec.c | 174 struct xs_handle *xsh; in libxl__xenstore_child_wait_deprecated() local 181 xsh = xs_daemon_open(); in libxl__xenstore_child_wait_deprecated() 182 if (xsh == NULL) { in libxl__xenstore_child_wait_deprecated() 187 xs_watch(xsh, path, path); in libxl__xenstore_child_wait_deprecated() 190 nfds = xs_fileno(xsh) + 1; in libxl__xenstore_child_wait_deprecated() 208 xs_unwatch(xsh, path, path); in libxl__xenstore_child_wait_deprecated() 209 xs_daemon_close(xsh); in libxl__xenstore_child_wait_deprecated() 214 FD_SET(xs_fileno(xsh), &rfds); in libxl__xenstore_child_wait_deprecated() 218 l = xs_read_watch(xsh, &num); in libxl__xenstore_child_wait_deprecated() 228 xs_unwatch(xsh, path, path); in libxl__xenstore_child_wait_deprecated() [all …]
|
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_fork.c | 618 if (CTX->xsh) { in libxl__ev_child_fork() 619 xs_daemon_destroy_postfork(CTX->xsh); in libxl__ev_child_fork() 620 CTX->xsh = NULL; /* turns mistakes into crashes */ in libxl__ev_child_fork() 665 assert(!CTX->xsh); in libxl__ev_child_xenstore_reopen() 666 CTX->xsh = xs_daemon_open(); in libxl__ev_child_xenstore_reopen() 667 if (!CTX->xsh) { in libxl__ev_child_xenstore_reopen() 672 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_pci.c | 245 t = xs_transaction_start(ctx->xsh); in libxl__device_pci_remove_xenstore() 248 if (!xs_transaction_end(ctx->xsh, t, 0)) in libxl__device_pci_remove_xenstore() 260 t = xs_transaction_start(ctx->xsh); in libxl__device_pci_remove_xenstore() 272 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 276 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 280 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 285 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 291 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 297 xs_rm(ctx->xsh, t, tmppath); in libxl__device_pci_remove_xenstore() 300 if (!xs_transaction_end(ctx->xsh, t, 0)) in libxl__device_pci_remove_xenstore() [all …]
|
A D | libxl_mem.c | 109 t = xs_transaction_start(ctx->xsh); in libxl__fill_dom0_memory_info() 161 if (!xs_transaction_end(ctx->xsh, t, 0)) { in libxl__fill_dom0_memory_info() 213 t = xs_transaction_start(ctx->xsh); in libxl_set_memory_target() 217 if (!xs_transaction_end(ctx->xsh, t, 1)) { in libxl_set_memory_target() 334 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() 1533 if (!xs_rm(ctx->xsh, XBT_NULL, vm_path)) in devices_destroy_cb() 1536 if (!xs_rm(ctx->xsh, XBT_NULL, dom_path)) in devices_destroy_cb() 1729 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.c | 106 ctx->xsh = xs_daemon_open(); in libxl_ctx_alloc() 107 if (!ctx->xsh) in libxl_ctx_alloc() 108 ctx->xsh = xs_domain_open(); in libxl_ctx_alloc() 109 if (!ctx->xsh) { in libxl_ctx_alloc() 174 if (ctx->xsh) xs_daemon_close(ctx->xsh); in libxl_ctx_free()
|
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() 201 xs_rm(ctx->xsh, t, frontend_path); in libxl__device_generic_add() 202 xs_mkdir(ctx->xsh, t, frontend_path); in libxl__device_generic_add() 210 xs_set_permissions(ctx->xsh, t, frontend_path, in libxl__device_generic_add() 213 xs_set_permissions(ctx->xsh, t, frontend_path, in libxl__device_generic_add() 215 xs_write(ctx->xsh, t, GCSPRINTF("%s/backend", frontend_path), in libxl__device_generic_add() 227 xs_rm(ctx->xsh, t, backend_path); in libxl__device_generic_add() 228 xs_mkdir(ctx->xsh, t, backend_path); in libxl__device_generic_add() 229 xs_set_permissions(ctx->xsh, t, backend_path, backend_perms, in libxl__device_generic_add() 231 xs_write(ctx->xsh, t, GCSPRINTF("%s/frontend", backend_path), in libxl__device_generic_add() [all …]
|
A D | libxl_create.c | 765 t = xs_transaction_start(ctx->xsh); in libxl__domain_make() 767 xs_rm(ctx->xsh, t, dom_path); in libxl__domain_make() 770 xs_rm(ctx->xsh, t, vm_path); in libxl__domain_make() 773 xs_rm(ctx->xsh, t, libxl_path); in libxl__domain_make() 778 xs_write(ctx->xsh, t, GCSPRINTF("%s/vm", dom_path), vm_path, strlen(vm_path)); in libxl__domain_make() 875 xs_write(ctx->xsh, t, GCSPRINTF("%s/uuid", vm_path), uuid_string, strlen(uuid_string)); in libxl__domain_make() 876 xs_write(ctx->xsh, t, GCSPRINTF("%s/name", vm_path), info->name, strlen(info->name)); in libxl__domain_make() 885 xs_write(ctx->xsh, t, GCSPRINTF("%s/type", libxl_path), dom_type, in libxl__domain_make() 888 if (!xs_transaction_end(ctx->xsh, t, 0)) { in libxl__domain_make() 901 if (t) xs_transaction_end(ctx->xsh, t, 1); in libxl__domain_make() [all …]
|
A D | libxl_disk.c | 487 tmp = xs_read(ctx->xsh, XBT_NULL, in libxl__disk_from_xenstore() 496 tmp = xs_read(ctx->xsh, XBT_NULL, in libxl__disk_from_xenstore() 502 tmp = xs_read(ctx->xsh, XBT_NULL, in libxl__disk_from_xenstore() 511 tmp = xs_read(ctx->xsh, XBT_NULL, \ in libxl__disk_from_xenstore() 535 disk->vdev = xs_read(ctx->xsh, XBT_NULL, in libxl__disk_from_xenstore() 618 diskinfo->backend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_disk_getinfo() 634 diskinfo->frontend = xs_read(ctx->xsh, XBT_NULL, in libxl_device_disk_getinfo()
|
/xen/tools/xenstore/include/ |
A D | xenstore.h | 80 void xs_close(struct xs_handle *xsh /* NULL ok */);
|