Re: [PATCH 2/2] Convert commands to support hooks

2013-04-12 Thread Nicholas Marriott
On Thu, Apr 11, 2013 at 11:51:22PM +0100, Thomas Adam wrote: > Hi, > > On Thu, Apr 11, 2013 at 11:32:21PM +0100, Nicholas Marriott wrote: > > Should prepare actually do validation be able to return > > CMD_RETURN_ERROR? Or would we want to run hooks even when we know the > > command is going to fa

Re: [PATCH 2/2] Convert commands to support hooks

2013-04-11 Thread Thomas Adam
Hi, On Thu, Apr 11, 2013 at 11:32:21PM +0100, Nicholas Marriott wrote: > Should prepare actually do validation be able to return > CMD_RETURN_ERROR? Or would we want to run hooks even when we know the > command is going to fail? Thanks for this feedback, and the other point about hooks acting mor

Re: [PATCH 2/2] Convert commands to support hooks

2013-04-11 Thread Nicholas Marriott
Should prepare actually do validation be able to return CMD_RETURN_ERROR? Or would we want to run hooks even when we know the command is going to fail? I think struct cmd_ctx would be better than cmd_context, it matches all the others. Could struct cmd_q just contain a cmd_ctx rather than a point