xfs
[Top] [All Lists]

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

To: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Subject: Re: [PATCH] mkfs: Set a clean output in case of invalid inode size
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 17 Apr 2012 10:33:27 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1334609816-8473-1-git-send-email-cmaiolino@xxxxxxxxxx>
References: <1334609816-8473-1-git-send-email-cmaiolino@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>