[libvirt] [PATCH v2]qemu:sheepdog correct OR to AND Permit qemu to access sheepdog volume on sheepdog's pool

From: root <joel.simoes@laposte.net> --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 7a0bee2..9cf2767 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1403,7 +1403,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, def->srcpool->pooltype = pooldef->type; def->srcpool->voltype = info.type; - if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI) || (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) { + if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI ) && (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) { virReportError(VIR_ERR_XML_ERROR, "%s", _("disk source mode is only valid when " "storage pool is of iscsi type or only direct for sheepdog ")); -- 1.8.3.2

I'm sleeping...
From: root <joel.simoes@laposte.net>
--- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 7a0bee2..9cf2767 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1403,7 +1403,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, def->srcpool->pooltype = pooldef->type; def->srcpool->voltype = info.type;
- if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI) || (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) { + if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI ) && (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) { virReportError(VIR_ERR_XML_ERROR, "%s", _("disk source mode is only valid when " "storage pool is of iscsi type or only direct for sheepdog "));
Not work correctly. replace with case or else it's much...

On 01/22/2014 06:51 AM, joel SIMOES wrote:
From: root <joel.simoes@laposte.net>
Please fix your git config. We cannot apply this patch as-is, as 'git shortlog' would then attribute it to the wrong author name. Also, your subject line is way too long. Please try to keep the first line less than 70 characters (see 'git shortlog -30' for an idea of typical subjects), then a blank line, then the further details in the body of the commit message.
--- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 7a0bee2..9cf2767 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1403,7 +1403,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, def->srcpool->pooltype = pooldef->type; def->srcpool->voltype = info.type;
- if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI) || (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) { + if ((def->srcpool->mode && pooldef->type != VIR_STORAGE_POOL_ISCSI ) && (def->srcpool->mode != VIR_DOMAIN_DISK_SOURCE_POOL_MODE_DIRECT && pooldef->type == VIR_STORAGE_POOL_SHEEPDOG ) ) {
As long as we are touching this long line, it would be nice to insert a line break. Also, our style forbids space before ).
virReportError(VIR_ERR_XML_ERROR, "%s", _("disk source mode is only valid when " "storage pool is of iscsi type or only direct for sheepdog "));
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Joel Simoes
-
joel SIMOES