Skip to contentSkip to conversation

qemu-img: delete the -e and -6 options from the 'create' command

PATCH Applied Daniel P. Berrange 3 participants 4 messages Jul 4, 2017

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-img: delete the -e and -6 options from the 'create' command

The '-e' and '-6' options to the 'create' command were "deprecated" in favour of the more generic '-o' option many years ago:

commit eec77d9e712bd4157a4e1c0b5a9249d168add738
Author: Jes Sorensen <[email protected]>
Date: Tue Dec 7 17:44:34 2010 +0100

qemu-img: Deprecate obsolete -6 and -e options

Except this was never actually a deprecation, which would imply giving the user a warning while the functionality continues to work for a number of releases before eventual removal. Instead the options were immediately turned into an error + exit. Given that the functionality is already broken, there's no point in keeping these psuedo-deprecation messages around any longer.

---
 qemu-img.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
qemu-img.c +1 -9
index 91ad6be..a65239f 100644
@@ -464,7 +464,7 @@ static int img_create(int argc, char **argv)
             {"object", required_argument, 0, OPTION_OBJECT},
             {0, 0, 0, 0}
         };
-        c = getopt_long(argc, argv, ":F:b:f:he6o:q",
+        c = getopt_long(argc, argv, ":F:b:f:ho:q",
                         long_options, NULL);
         if (c == -1) {
             break;
@@ -488,14 +488,6 @@ static int img_create(int argc, char **argv)
         case 'f':
             fmt = optarg;
             break;
-        case 'e':
-            error_report("option -e is deprecated, please use \'-o "
-                  "encryption\' instead!");
-            goto fail;
-        case '6':
-            error_report("option -6 is deprecated, please use \'-o "
-                  "compat6\' instead!");
-            goto fail;
         case 'o':
             if (!is_valid_option_list(optarg)) {
                 error_report("Invalid option list: %s", optarg);
Signature · 1 line
2.9.4
Applied
#1 lore raw

Am 04.07.2017 um 12:34 hat Daniel P. Berrange geschrieben:

Quoted 9 lines

The '-e' and '-6' options to the 'create' command were "deprecated" in favour of the more generic '-o' option many years ago:

commit eec77d9e712bd4157a4e1c0b5a9249d168add738
Author: Jes Sorensen <[email protected]>
Date: Tue Dec 7 17:44:34 2010 +0100

qemu-img: Deprecate obsolete -6 and -e options

Quoted 8 lines

Except this was never actually a deprecation, which would imply giving the user a warning while the functionality continues to work for a number of releases before eventual removal. Instead the options were immediately turned into an error + exit. Given that the functionality is already broken, there's no point in keeping these psuedo-deprecation messages around any longer.

Thanks, applied to the block branch.

Do you want to send another patch to do the same in qemu-img convert?

Kevin

#2 lore raw
Quoted 17 lines · Kevin Wolf

Am 04.07.2017 um 12:34 hat Daniel P. Berrange geschrieben:

Quoted 16 lines

The '-e' and '-6' options to the 'create' command were "deprecated" in favour of the more generic '-o' option many years ago:

commit eec77d9e712bd4157a4e1c0b5a9249d168add738
Author: Jes Sorensen <[email protected]>
Date: Tue Dec 7 17:44:34 2010 +0100

qemu-img: Deprecate obsolete -6 and -e options

Except this was never actually a deprecation, which would imply giving the user a warning while the functionality continues to work for a number of releases before eventual removal. Instead the options were immediately turned into an error + exit. Given that the functionality is already broken, there's no point in keeping these psuedo-deprecation messages around any longer.

Quoted 5 lines
Quoted 1 line

Thanks, applied to the block branch.

Do you want to send another patch to do the same in qemu-img convert?

Opps, I wasn't paying attention & missed the convert command. I'll just send a v2 of this that covers both.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#3 lore raw
In reply to Daniel P. Berrange
Quoted 7 lines · Daniel P. Berrange

The '-e' and '-6' options to the 'create' command were "deprecated" in favour of the more generic '-o' option many years ago:

commit eec77d9e712bd4157a4e1c0b5a9249d168add738
Author: Jes Sorensen <[email protected]>
Date: Tue Dec 7 17:44:34 2010 +0100

Quoted 8 lines

qemu-img: Deprecate obsolete -6 and -e options

Except this was never actually a deprecation, which would imply giving the user a warning while the functionality continues to work for a number of releases before eventual removal. Instead the options were immediately turned into an error + exit. Given that the functionality is already broken, there's no point in keeping these psuedo-deprecation messages around any longer.

Sounds and looks good.

Quoted 4 lines
---
 qemu-img.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

FWIW:

Quoted 32 lines
qemu-img.c +1 -9
index 91ad6be..a65239f 100644
@@ -464,7 +464,7 @@ static int img_create(int argc, char **argv)
             {"object", required_argument, 0, OPTION_OBJECT},
             {0, 0, 0, 0}
         };
-        c = getopt_long(argc, argv, ":F:b:f:he6o:q",
+        c = getopt_long(argc, argv, ":F:b:f:ho:q",
                         long_options, NULL);
         if (c == -1) {
             break;
@@ -488,14 +488,6 @@ static int img_create(int argc, char **argv)
         case 'f':
             fmt = optarg;
             break;
-        case 'e':
-            error_report("option -e is deprecated, please use \'-o "
-                  "encryption\' instead!");
-            goto fail;
-        case '6':
-            error_report("option -6 is deprecated, please use \'-o "
-                  "compat6\' instead!");
-            goto fail;
         case 'o':
             if (!is_valid_option_list(optarg)) {
                 error_report("Invalid option list: %s", optarg);
Signature · 1 line
2.9.4
Signature · 1 line
/kashyap