Re: [Qemu-devel] [PATCH v2] qemu-img: Improve error messages

2014-04-21 Thread Fam Zheng
On Tue, 04/22 11:31, Wang Sen wrote: > On Tue, Apr 22, 2014 at 10:04:21AM +0800, Fam Zheng wrote: > > 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

Re: [Qemu-devel] [PATCH v2] qemu-img: Improve error messages

2014-04-21 Thread Wang Sen
On Tue, Apr 22, 2014 at 10:04:21AM +0800, Fam Zheng wrote: > 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-devel] [PATCH v2] qemu-img: Improve error messages

2014-04-21 Thread Fam Zheng
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 --help" now has a more reasonable exit code 0. In the future t