From: Keir Fraser Date: Tue, 8 Dec 2009 07:44:45 +0000 (+0000) Subject: libxenlight: minimal vfs support X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12953 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d08e561228a13f7383efaee6820c50797e61c225;p=xen.git libxenlight: minimal vfs support This patch adds minimal support for fs-backend and minios' fs-front to libxenlight: - it creates a vfs directory on the stubdom's xenstore device path and allows the stubdom to write to it; - it doesn't try to cleany shutdown the vfs backend. Signed-off-by: Stefano Stabellini --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 54cdd413c8..91b07c3bdc 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -875,6 +875,8 @@ retry_transaction: t = xs_transaction_start(ctx->xsh); xs_mkdir(ctx->xsh, t, libxl_sprintf(ctx, "/local/domain/0/device-model/%d", info->domid)); xs_set_permissions(ctx->xsh, t, libxl_sprintf(ctx, "/local/domain/0/device-model/%d", info->domid), perm, ARRAY_SIZE(perm)); + xs_mkdir(ctx->xsh, t, libxl_sprintf(ctx, "/local/domain/%d/device/vfs", domid)); + xs_set_permissions(ctx->xsh, t, libxl_sprintf(ctx, "/local/domain/%d/device/vfs",domid), perm, ARRAY_SIZE(perm)); if (!xs_transaction_end(ctx->xsh, t, 0)) if (errno == EAGAIN) goto retry_transaction; diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 00a80727b3..36f36841ab 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -254,6 +254,8 @@ int libxl_devices_destroy(struct libxl_ctx *ctx, uint32_t domid, int force) return -1; } for (i = 0; i < num1; i++) { + if (!strcmp("vfs", l1[i])) + continue; path = libxl_sprintf(&clone, "/local/domain/%d/device/%s", domid, l1[i]); l2 = libxl_xs_directory(&clone, XBT_NULL, path, &num2); if (!l2)