On 15/5/19 10:26 PM, David Sterba wrote:
On Fri, Mar 29, 2019 at 01:49:53PM +0800, Anand Jain wrote:
@@ -386,7 +386,9 @@ static int cmd_device_scan(int argc, char **argv)
}
out:
- return !!ret;
+ if (ret < 0)
+ return -ret;
+ return ret;
No, cmd_device_scan as the command handler returns the error code that's
intepreted by shell. Most commands do just 0 and 1, in documented case
there are other values, but we can't return errno here.
Ok. errno is better error informative though. Interpreted by shell seems
to be a roadblock.