public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs: Set a clean output in case of invalid inode size
@ 2012-04-16 20:56 Carlos Maiolino
  2012-04-17  0:33 ` Dave Chinner
  2012-09-26 18:12 ` Mark Tinguely
  0 siblings, 2 replies; 3+ messages in thread
From: Carlos Maiolino @ 2012-04-16 20:56 UTC (permalink / raw)
  To: xfs; +Cc: Carlos Maiolino

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@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);
 	}
 
 	/* if lsu or lsunit was specified, automatically use v2 logs */
-- 
1.7.7.6

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mkfs: Set a clean output in case of invalid inode size
  2012-04-16 20:56 [PATCH] mkfs: Set a clean output in case of invalid inode size Carlos Maiolino
@ 2012-04-17  0:33 ` Dave Chinner
  2012-09-26 18:12 ` Mark Tinguely
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2012-04-17  0:33 UTC (permalink / raw)
  To: Carlos Maiolino; +Cc: xfs

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@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@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mkfs: Set a clean output in case of invalid inode size
  2012-04-16 20:56 [PATCH] mkfs: Set a clean output in case of invalid inode size Carlos Maiolino
  2012-04-17  0:33 ` Dave Chinner
@ 2012-09-26 18:12 ` Mark Tinguely
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Tinguely @ 2012-09-26 18:12 UTC (permalink / raw)
  To: Carlos Maiolino; +Cc: xfs

On 04/16/12 15:56, 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@redhat.com>
> ---


Found that this patch was reviewed but not committed.

Committed to git://oss.sgi.com/xfs/cmds/xfsprogs.git, master branch.

--Mark.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-26 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 20:56 [PATCH] mkfs: Set a clean output in case of invalid inode size Carlos Maiolino
2012-04-17  0:33 ` Dave Chinner
2012-09-26 18:12 ` Mark Tinguely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox