qemu-img: drop -e and -6 options from the 'create' & 'convert' commands
The '-e' and '-6' options to the 'create' & 'convert' commands were
"deprecated" in favour of the more generic '-o' option many years ago:
  commit eec77d9e712bd4157a4e1c0b5a9249d168add738
  Author: Jes Sorensen <Jes.Sorensen@redhat.com>
  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.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									8b544293ef
								
							
						
					
					
						commit
						6b4df54833
					
				
							
								
								
									
										20
									
								
								qemu-img.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								qemu-img.c
									
									
									
									
									
								
							@ -464,7 +464,7 @@ static int img_create(int argc, char **argv)
 | 
				
			|||||||
            {"object", required_argument, 0, OPTION_OBJECT},
 | 
					            {"object", required_argument, 0, OPTION_OBJECT},
 | 
				
			||||||
            {0, 0, 0, 0}
 | 
					            {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);
 | 
					                        long_options, NULL);
 | 
				
			||||||
        if (c == -1) {
 | 
					        if (c == -1) {
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
@ -488,14 +488,6 @@ static int img_create(int argc, char **argv)
 | 
				
			|||||||
        case 'f':
 | 
					        case 'f':
 | 
				
			||||||
            fmt = optarg;
 | 
					            fmt = optarg;
 | 
				
			||||||
            break;
 | 
					            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':
 | 
					        case 'o':
 | 
				
			||||||
            if (!is_valid_option_list(optarg)) {
 | 
					            if (!is_valid_option_list(optarg)) {
 | 
				
			||||||
                error_report("Invalid option list: %s", optarg);
 | 
					                error_report("Invalid option list: %s", optarg);
 | 
				
			||||||
@ -1985,7 +1977,7 @@ static int img_convert(int argc, char **argv)
 | 
				
			|||||||
            {"target-image-opts", no_argument, 0, OPTION_TARGET_IMAGE_OPTS},
 | 
					            {"target-image-opts", no_argument, 0, OPTION_TARGET_IMAGE_OPTS},
 | 
				
			||||||
            {0, 0, 0, 0}
 | 
					            {0, 0, 0, 0}
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        c = getopt_long(argc, argv, ":hf:O:B:ce6o:s:l:S:pt:T:qnm:WU",
 | 
					        c = getopt_long(argc, argv, ":hf:O:B:co:s:l:S:pt:T:qnm:WU",
 | 
				
			||||||
                        long_options, NULL);
 | 
					                        long_options, NULL);
 | 
				
			||||||
        if (c == -1) {
 | 
					        if (c == -1) {
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
@ -2012,14 +2004,6 @@ static int img_convert(int argc, char **argv)
 | 
				
			|||||||
        case 'c':
 | 
					        case 'c':
 | 
				
			||||||
            s.compressed = true;
 | 
					            s.compressed = true;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case 'e':
 | 
					 | 
				
			||||||
            error_report("option -e is deprecated, please use \'-o "
 | 
					 | 
				
			||||||
                  "encryption\' instead!");
 | 
					 | 
				
			||||||
            goto fail_getopt;
 | 
					 | 
				
			||||||
        case '6':
 | 
					 | 
				
			||||||
            error_report("option -6 is deprecated, please use \'-o "
 | 
					 | 
				
			||||||
                  "compat6\' instead!");
 | 
					 | 
				
			||||||
            goto fail_getopt;
 | 
					 | 
				
			||||||
        case 'o':
 | 
					        case 'o':
 | 
				
			||||||
            if (!is_valid_option_list(optarg)) {
 | 
					            if (!is_valid_option_list(optarg)) {
 | 
				
			||||||
                error_report("Invalid option list: %s", optarg);
 | 
					                error_report("Invalid option list: %s", optarg);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user