[PATCH] mkfs: Set a clean output in case of invalid inode size

Dave Chinner david at fromorbit.com
Mon Apr 16 19:33:27 CDT 2012


On Mon, Apr 16, 2012 at 05:56:56PM -0300, Carlos Maiolino wrote:
> Remove an unnecessary usage() call after a mkfs failure due an invalid inode
> size.
> A call to usage() at this point confuses the output message which may cause the
> user to think it used wrong arguments to mkfs, instead of an invalid inode size.
> 
> Signed-off-by: Carlos Maiolino <cmaiolino at redhat.com>
> ---
>  mkfs/xfs_mkfs.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 5445b6f..19d4815 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -1898,7 +1898,7 @@ _("block size %d cannot be smaller than logical sector size %d\n"),
>  			fprintf(stderr,
>  	_("allowable inode size with %d byte blocks is between %d and %d\n"),
>  				blocksize, XFS_DINODE_MIN_SIZE, maxsz);
> -		usage();
> +		exit(1);
>  	}

Looks like a good idea to me - no need to spam with usage
information.

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list