WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxenlight: minimal vfs support

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxenlight: minimal vfs support
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 7 Dec 2009 15:32:46 +0000
Delivery-date: Mon, 07 Dec 2009 07:29:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hi all,
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 <stefano.stabellini@xxxxxxxxxxxxx>
---

diff -r b4c47cfbb9b1 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Dec 02 15:02:06 2009 +0000
+++ b/tools/libxl/libxl.c       Wed Dec 02 16:57:15 2009 +0000
@@ -798,6 +798,8 @@
     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 -r b4c47cfbb9b1 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Wed Dec 02 15:02:06 2009 +0000
+++ b/tools/libxl/libxl_device.c        Wed Dec 02 16:57:15 2009 +0000
@@ -224,6 +224,8 @@
         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)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxenlight: minimal vfs support, Stefano Stabellini <=