[sheepdog] [PATCH] collie: cleanup callbacks of collie command when they send header only requests

Liu Yuan namei.unix at gmail.com
Fri Jul 27 07:44:49 CEST 2012


On 07/27/2012 12:37 PM, Yunkai Zhang wrote:
> I just want to keep the new code consistent with the original version.
> 

The old code is broken -- not consistent in all places, that didn't
abbey the same rule for error code.

> The upper code, such as cluster_shutdown, will return different EXIT
> code(EXIT_SYSFAIL or EXIT_FAILURE) to user according different error
> type.
> 
> Does user care about this EXIT code? If not, I'm not against to change
> send_light_req().

If you want to return EXIT_XXX to user space, then I'd suggest:
  return EXIT_SUCCESS for success and return EXIT_XXX for other error
case instead of -1 and 1 for error case, then upper code doesn't need to
translate these error code.

Thanks,
Yuan



More information about the sheepdog mailing list