Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-30 Thread Mike Day
On Wed, Apr 30, 2014 at 10:16 AM, Eric Blake wrote: > Additional patches: > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg04074.html > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg04468.html > both already on the queue for the next PULL request of the block branch. Excellen

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-30 Thread Eric Blake
On 04/30/2014 08:12 AM, Mike Day wrote: > On Sun, Apr 27, 2014 at 9:55 PM, Fam Zheng wrote: /* not found */ -help(); -return 0; +error_exit("Command not found: %s", cmdname); >>> >>> Looks like we just relied previously on the default 'not found' case >>> for h

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-30 Thread Mike Day
On Sun, Apr 27, 2014 at 9:55 PM, Fam Zheng wrote: >> > /* not found */ >> > -help(); >> > -return 0; >> > +error_exit("Command not found: %s", cmdname); >> >> Looks like we just relied previously on the default 'not found' case >> for help() to provide the "--help" option. >> > >

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-27 Thread Fam Zheng
On Fri, 04/25 14:18, Jeff Cody wrote: > On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: > > From: 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

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-25 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: >> From: 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-

Re: [Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-25 Thread Jeff Cody
On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: > From: 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 informat

[Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-23 Thread Kevin Wolf
From: 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