]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
qemu-img: Improve error messages
authorFam Zheng <famz@redhat.com>
Tue, 22 Apr 2014 05:36:11 +0000 (13:36 +0800)
committerKevin Wolf <kwolf@redhat.com>
Tue, 22 Apr 2014 11:47:46 +0000 (13:47 +0200)
commitac1307abfe63ac93a9289e773116bb0de07c335b
treeb1799b7ef32311bb417405bfe444b15735ad383b
parent90d9d30152674677aa7b810cf7debe01dc2780f6
qemu-img: Improve error messages

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: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c