Re: [PATCH 01/10] findfs: use symbolic exit values, and tell about them in manual

Karel Zak
2014-03-12T10:37:23Z

On Sun, Mar 09, 2014 at 03:30:14PM -0500, Sami Kerola wrote:
> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
> ---
> include/exitcodes.h | 5 +++++
> misc-utils/findfs.8 | 30 ++++++++++++++++++++++++++----
> misc-utils/findfs.c | 13 +++++++------
> 3 files changed, 38 insertions(+), 10 deletions(-)
>
> diff --git a/include/exitcodes.h b/include/exitcodes.h
> index 24ee123..fc893f1 100644
> --- a/include/exitcodes.h
> +++ b/include/exitcodes.h
> @@ -32,4 +32,9 @@
> #define MOUNT_EX_FAIL 32 /* mount failure */
> #define MOUNT_EX_SOMEOK 64 /* some mount succeeded */
>
> +/* Exit codes used by findfs. */
> +#define FINDFS_SUCCESS 0 /* no errors */
> +#define FINDFS_NOT_FOUND 1 /* label or uuid cannot be found */
> +#define FINDFS_USAGE_ERROR 2 /* user did something unexpected */

Do we really need to add findfs exit codes to exitcodes.h? The
codes are specific to findfs and no shared anywhere.

It would be also better to use FINDFS_EX_{SUCCESS,NOTFOUND,USAGE}.

Karel

--
Karel Zak <kzak@redhat.com>