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.
