diff --git a/v2v/domainxml-c.c b/v2v/domainxml-c.c index 060f426af..4876f949e 100644 --- a/v2v/domainxml-c.c +++ b/v2v/domainxml-c.c @@ -46,6 +46,8 @@ #ifdef HAVE_LIBVIRT +#define ERROR_MESSAGE_LEN 512 + static void ignore_errors (void *ignore, virErrorPtr ignore2) { @@ -117,7 +119,7 @@ connect_and_load_pool (value connv, value poolnamev) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; virStoragePoolPtr pool; @@ -157,7 +159,8 @@ connect_and_load_pool (value connv, value poolnamev) if (!pool) { err = virGetLastError (); snprintf (errmsg, sizeof errmsg, - _("cannot find libvirt pool '%s': %s"), poolname, err->message); + _("cannot find libvirt pool '%s': %s\n\nUse `virsh pool-list --all' to list all available pools, and `virsh pool-dumpxml ' to display details about a particular pool.\n\nTo set the pool which virt-v2v uses, add the `-os ' option."), + poolname, err->message); virConnectClose (conn); caml_invalid_argument (errmsg); } @@ -177,7 +180,7 @@ v2v_dumpxml (value passwordv, value connv, value domnamev) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; virDomainPtr dom; @@ -278,7 +281,7 @@ v2v_pool_dumpxml (value connv, value poolnamev) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; virStoragePoolPtr pool; @@ -316,7 +319,7 @@ v2v_vol_dumpxml (value connv, value poolnamev, value volnamev) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; virStoragePoolPtr pool; @@ -372,7 +375,7 @@ v2v_capabilities (value connv, value unitv) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; @@ -427,7 +430,7 @@ v2v_domain_exists (value connv, value domnamev) /* We have to assemble the error on the stack because a dynamic * string couldn't be freed. */ - char errmsg[256]; + char errmsg[ERROR_MESSAGE_LEN]; virErrorPtr err; virConnectPtr conn; virDomainPtr dom;