diff --git a/ChangeLog b/ChangeLog index 239315ad1cd75e8039c9b2a52ebc74e32fde9093..c40b127de0f737fedd2da2626bf465f98c6666b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 25 13:37:22 EDT 2006 Daniel Veillard + + * src/xend_internal.c: applied patch from Jim Fehlig when parsing + domain S-Expr the kernel may not be provided (Dom0) + Mon Apr 24 18:23:29 EDT 2006 Daniel Veillard * src/hash.c src/internal.h: add virGetDomainByID() to speed up diff --git a/src/xend_internal.c b/src/xend_internal.c index 1bea597f46fcbbdc5a25ecc476d3c20a17c0a74f..3655246516ffa1eecc4aef56d523a2192af35baa 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -1350,28 +1350,30 @@ xend_parse_sexp_desc(struct sexpr *root) tmp = sexpr_node(root, "domain/bootloader"); if (tmp != NULL) virBufferVSprintf(&buf, " %s\n", tmp); - tmp = sexpr_node(root, "domain/image/linux/kernel"); - if (tmp == NULL) { - /* - * TODO: we will need some fallback here for other guest OSes - */ - virXendError(NULL, VIR_ERR_INTERNAL_ERROR, - "domain informations incomplete, missing kernel"); - goto error; + if (sexpr_lookup(root, "domain/image")) { + tmp = sexpr_node(root, "domain/image/linux/kernel"); + if (tmp == NULL) { + /* + * TODO: we will need some fallback here for other guest OSes + */ + virXendError(NULL, VIR_ERR_INTERNAL_ERROR, + "domain informations incomplete, missing kernel"); + goto error; + } + virBufferAdd(&buf, " \n", 7); + virBufferVSprintf(&buf, " linux\n"); + virBufferVSprintf(&buf, " %s\n", tmp); + tmp = sexpr_node(root, "domain/image/linux/ramdisk"); + if ((tmp != NULL) && (tmp[0] != 0)) + virBufferVSprintf(&buf, " %s\n", tmp); + tmp = sexpr_node(root, "domain/image/linux/root"); + if ((tmp != NULL) && (tmp[0] != 0)) + virBufferVSprintf(&buf, " %s\n", tmp); + tmp = sexpr_node(root, "domain/image/linux/args"); + if ((tmp != NULL) && (tmp[0] != 0)) + virBufferVSprintf(&buf, " %s\n", tmp); + virBufferAdd(&buf, " \n", 8); } - virBufferAdd(&buf, " \n", 7); - virBufferVSprintf(&buf, " linux\n"); - virBufferVSprintf(&buf, " %s\n", tmp); - tmp = sexpr_node(root, "domain/image/linux/ramdisk"); - if ((tmp != NULL) && (tmp[0] != 0)) - virBufferVSprintf(&buf, " %s\n", tmp); - tmp = sexpr_node(root, "domain/image/linux/root"); - if ((tmp != NULL) && (tmp[0] != 0)) - virBufferVSprintf(&buf, " %s\n", tmp); - tmp = sexpr_node(root, "domain/image/linux/args"); - if ((tmp != NULL) && (tmp[0] != 0)) - virBufferVSprintf(&buf, " %s\n", tmp); - virBufferAdd(&buf, " \n", 8); virBufferVSprintf(&buf, " %d\n", (int) (sexpr_u64(root, "domain/maxmem") << 10)); virBufferVSprintf(&buf, " %d\n",