• Fam Zheng's avatar
    qemu-img: Improve error messages · ac1307ab
    Fam Zheng authored
    Previously, when there is a user error in argv parsing, qemu-img prints
    help text and exits.
    
    Add an error_exit function to print a helpful error message and a hint
    to run 'qemu-img --help' for more information.
    
    As a bonus, "qemu-img <cmd> --help" now has a more reasonable exit code
    0.
    
    In the future the help text should be split by sub command, and only
    print the information for the specified command.
    Signed-off-by: default avatarFam Zheng <famz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    ac1307ab
qemu-img.c 82.1 KB