|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 21/21] xenstored: Add stub domain builder
On Fri, 2012-01-20 at 20:47 +0000, Daniel De Graaf wrote:
> +int main(int argc, char** argv)
> +{
> + xc_interface *xch;
> + struct xs_handle *xsh;
> + char buf[16];
> + int rv;
> +
> + if (argc != 4) {
> + printf("Use: %s <xenstore-kernel> <memory_mb> <flask-label>\n",
> argv[0]);
> + return 2;
> + }
> +
> + xch = xc_interface_open(NULL, NULL, 0);
> + if (!xch) return 1;
> +
> + rv = build(xch, argv);
> +
> + xc_interface_close(xch);
> +
> + if (rv) return 1;
Did you consider forking a daemon at this point to sit and drain the
domains console ring into a log file? (instead of/as well as your patch
08/21).
The following bit would remain in the existing process so there would be
no risk of deadlock AFAICT.
> +
> + xsh = xs_open(0);
> + rv = snprintf(buf, 16, "%d", domid);
> + xs_write(xsh, XBT_NULL, "/tool/xenstored/domid", buf, rv);
> + xs_daemon_close(xsh);
> +
> + return 0;
> +}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |