Changeset
src/conf/domain_conf.c | 6 ++++++
1 file changed, 6 insertions(+)
Git apply log
Switched to a new branch '20180312135736.9783-1-berrange@redhat.com'
Applying: conf: allow more user friendly names for disk formats
To https://github.com/patchew-project/libvirt
 * [new tag]         patchew/20180312135736.9783-1-berrange@redhat.com -> patchew/20180312135736.9783-1-berrange@redhat.com
Test passed: syntax-check

loading

[libvirt] [PATCH] conf: allow more user friendly names for disk formats
Posted by Daniel P. Berrangé, 14 weeks ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/conf/domain_conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 04a6ee77af..007b73a84d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9152,6 +9152,12 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
         if (STREQ(tmp, "aio")) {
             /* Xen back-compat */
             def->src->format = VIR_STORAGE_FILE_RAW;
+        } else if (STREQ(tmp, "🐄")) {
+            def->src->format = VIR_STORAGE_FILE_COW;
+        } else if (STREQ(tmp, "q🐄")) {
+            def->src->format = VIR_STORAGE_FILE_QCOW;
+        } else if (STREQ(tmp, "q🐄2")) {
+            def->src->format = VIR_STORAGE_FILE_QCOW2;
         } else {
             if ((def->src->format = virStorageFileFormatTypeFromString(tmp)) <= 0) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] conf: allow more user friendly names for disk formats
Posted by Ján Tomko, 14 weeks ago
Your system clock is 21 days early.

On Mon, Mar 12, 2018 at 01:57:36PM +0000, Daniel P. Berrangé wrote:
>Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>---
> src/conf/domain_conf.c | 6 ++++++
> 1 file changed, 6 insertions(+)

Missing tests.

>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 04a6ee77af..007b73a84d 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -9152,6 +9152,12 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
>         if (STREQ(tmp, "aio")) {
>             /* Xen back-compat */
>             def->src->format = VIR_STORAGE_FILE_RAW;
>+        } else if (STREQ(tmp, "🐄")) {
>+            def->src->format = VIR_STORAGE_FILE_COW;
>+        } else if (STREQ(tmp, "q🐄")) {
>+            def->src->format = VIR_STORAGE_FILE_QCOW;

These formats are hardly used anymore, I don't think adding new
functionality there is worth the trouble.

Jan

>+        } else if (STREQ(tmp, "q🐄2")) {
>+            def->src->format = VIR_STORAGE_FILE_QCOW2;
>         } else {
>             if ((def->src->format = virStorageFileFormatTypeFromString(tmp)) <= 0) {
>                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>-- 
>2.14.3
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] conf: allow more user friendly names for disk formats
Posted by Kashyap Chamarthy, 14 weeks ago
On Mon, Mar 12, 2018 at 01:57:36PM +0000, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/conf/domain_conf.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 04a6ee77af..007b73a84d 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -9152,6 +9152,12 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
>          if (STREQ(tmp, "aio")) {
>              /* Xen back-compat */
>              def->src->format = VIR_STORAGE_FILE_RAW;
> +        } else if (STREQ(tmp, "🐄")) {
> +            def->src->format = VIR_STORAGE_FILE_COW;
> +        } else if (STREQ(tmp, "q🐄")) {
> +            def->src->format = VIR_STORAGE_FILE_QCOW;
> +        } else if (STREQ(tmp, "q🐄2")) {
> +            def->src->format = VIR_STORAGE_FILE_QCOW2;

FWIW:

    Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>

Regards,
A jubiliant user

>          } else {
>              if ((def->src->format = virStorageFileFormatTypeFromString(tmp)) <= 0) {
>                  virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> -- 
> 2.14.3
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list