On 02/27/2014 12:55 PM, Christophe Vu-Brugier wrote:
Hi Andy,
On Thu, 27 Feb 2014 11:30:35 -0800, Andy Grover wrote :
One long-standing issue with targetcli is that when giving it single commands from the command line, it doesn't return a nonzero error code if there's an error of certain types -- it prints a message, but a success error code. This makes it hard for targetcli to be scripted. [snip] So, before I go ahead, any objections, or discussion? Speak up, or I'm going ahead early next week :)
+1. Targetcli should return a status code, otherwise it cannot be used safely in scripts. What error codes are you going to define?
0: OK 1: Failure
after a little Googling and finding:
http://tldp.org/LDP/abs/html/exitcodes.html
very likely just this one, was the current plan.
-- Andy