|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] init-xenstore-domain: Add optional ramdisk argument.
commit b764b0166b25b2d55732f329dacf56f370cf0572
Author: James Bielman <jamesjb@xxxxxxxxxx>
AuthorDate: Mon Jul 7 14:52:24 2014 -0700
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Jul 10 15:51:19 2014 +0100
init-xenstore-domain: Add optional ramdisk argument.
- Added an optional argument to allow passing a ramdisk
to the Xenstore domain built by init-xenstore-domain.
- This is needed for Xenstore/MAC to pass initial security
policy.
Signed-off-by: James Bielman <jamesjb@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
tools/xenstore/init-xenstore-domain.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/tools/xenstore/init-xenstore-domain.c
b/tools/xenstore/init-xenstore-domain.c
index 56a3c72..0d12169 100644
--- a/tools/xenstore/init-xenstore-domain.c
+++ b/tools/xenstore/init-xenstore-domain.c
@@ -13,7 +13,7 @@
static uint32_t domid = -1;
-static int build(xc_interface *xch, char** argv)
+static int build(xc_interface *xch, int argc, char** argv)
{
char cmdline[512];
uint32_t ssid;
@@ -44,6 +44,12 @@ static int build(xc_interface *xch, char** argv)
dom = xc_dom_allocate(xch, cmdline, NULL);
rv = xc_dom_kernel_file(dom, argv[1]);
if (rv) goto err;
+
+ if (argc > 4) {
+ rv = xc_dom_ramdisk_file(dom, argv[4]);
+ if (rv) goto err;
+ }
+
rv = xc_dom_boot_xen_init(dom, xch, domid);
if (rv) goto err;
rv = xc_dom_parse_image(dom);
@@ -81,15 +87,15 @@ int main(int argc, char** argv)
char buf[16];
int rv, fd;
- if (argc != 4) {
- printf("Use: %s <xenstore-kernel> <memory_mb> <flask-label>\n",
argv[0]);
+ if (argc < 4 || argc > 5) {
+ printf("Use: %s <xenstore-kernel> <memory_mb> <flask-label>
[<ramdisk-file>]\n", argv[0]);
return 2;
}
xch = xc_interface_open(NULL, NULL, 0);
if (!xch) return 1;
- rv = build(xch, argv);
+ rv = build(xch, argc, argv);
xc_interface_close(xch);
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |