On Sat, Feb 16, 2008 at 07:08:27PM +0100, Michael Biebl wrote:
> 2008/2/16, Victor Lowther <[EMAIL PROTECTED]>:
> >
> > Reserving an exit code for "not applicable" or "skipped" woud be fine,
> > but all those "|| exit 1" and the final "exit 0" are redundant.
> 
> Not quite. Using || exit 1 normalizes the return code in case of an error.
> Take 20video as an example.
> Running vbetool could give you an return code other than 1 in case of
> an error ( I haven't actually checked the code, but you get the idea),
> maybe even 2 (ie. the code we reserve for skipped).
> So the || exit 1 is not redundant.

Which throws away potentially valuable debugging information.

Which is why I propose using 254 as our "skipped/not applicable"
error code and report the error code the hook returned if it is not 0 or
254.  

Upcoming patch series has a working implementation on this proposal.

> Michael
> -- 
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?

-- 
Victor Lowther
Ubuntu Certified Professional
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to