diff --git a/xen-dom-mgmt/src/xen-dom-mgmt.c b/xen-dom-mgmt/src/xen-dom-mgmt.c index ac3a13c1..fbbff101 100644 --- a/xen-dom-mgmt/src/xen-dom-mgmt.c +++ b/xen-dom-mgmt/src/xen-dom-mgmt.c @@ -945,10 +945,21 @@ static int init_domain0(const struct device *d) dom0->max_mem_kb = 0; #endif - xs_init_root(); - xss_write("/tool/xenstored", ""); - xs_initialize_xenstore(0, dom0); + ret = xs_init_root(); + if (ret) { + LOG_ERR("Failed to init Xenstore root node"); + goto out; + } + ret = xss_write("/tool/xenstored", ""); + if (ret) { + LOG_ERR("Failed to create /tool/xenstored node, err = %d", ret); + } + + ret = xs_initialize_xenstore(0, dom0); + if (ret) { + LOG_ERR("Failed to add Domain-0 xenstore entries, err = %d", ret); + } out: #ifdef CONFIG_XSTAT k_free(dom0stat); diff --git a/xenstore-srv/src/xenstore_srv.c b/xenstore-srv/src/xenstore_srv.c index e32e7e89..a9e09747 100644 --- a/xenstore-srv/src/xenstore_srv.c +++ b/xenstore-srv/src/xenstore_srv.c @@ -2121,8 +2121,7 @@ int xs_init_root(void) sys_dlist_init(&root_xenstore.child_list); sys_dnode_init(&root_xenstore.node); - set_perms_by_array(&root_xenstore, &permissions, 1); - return 0; + return set_perms_by_array(&root_xenstore, &permissions, 1); }