xfs
[Top] [All Lists]

Re: different error messages for mkfs.xfs -ssize

To: "Kinzel, David" <David.Kinzel@xxxxxxxxxx>
Subject: Re: different error messages for mkfs.xfs -ssize
From: Wengang Wang <wen.gang.wang@xxxxxxxxxx>
Date: Fri, 23 Apr 2010 10:48:25 +0800
Cc: Wengang Wang <wen.gang.wang@xxxxxxxxxx>, xfs@xxxxxxxxxxx, greg.marsden@xxxxxxxxxx, joe.jin@xxxxxxxxxx
In-reply-to: <F57F2AD357626644AF76410876025D751277F5@xxxxxxxxxxxxxxxxxxx>
References: <20100422153636.GB3822@xxxxxxxxxxxxxxxxx> <F57F2AD357626644AF76410876025D751277F5@xxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-08-17)
On 10-04-22 10:18, Kinzel, David wrote:
> >-----Original Message-----
> >From: xfs-bounces@xxxxxxxxxxx [mailto:xfs-bounces@xxxxxxxxxxx] 
> >On Behalf Of Wengang Wang
> >Sent: Thursday, April 22, 2010 9:37 AM
> >To: xfs@xxxxxxxxxxx
> >Cc: greg.marsden@xxxxxxxxxx; joe.jin@xxxxxxxxxx
> >Subject: different error messages for mkfs.xfs -ssize
> >
> >Hi experts,
> >
> >I got different error messages when provide different value for -ssize.
> >Why the error messages are different? They are different but no one is
> >containing more info than the other.
> 
> 1639         if (sectorsize < XFS_MIN_SECTORSIZE ||
> 1640             sectorsize > XFS_MAX_SECTORSIZE || sectorsize >
> blocksize) {
> 1641                 fprintf(stderr, _("illegal sector size %d\n"),
> sectorsize);
> 1642                 usage();
> 1643         }
> 
> According to the defaults:
> 
> 62 #define XFS_MIN_SECTORSIZE_LOG  9       /* i.e. 512 bytes */
> 64 #define XFS_MIN_SECTORSIZE      (1 << XFS_MIN_SECTORSIZE_LOG)
> 
> Looks like your sectorsize is not greater than XFS_MIN_SECTORSIZE
> (illegal sector size)
> 
> For 3072,
> 
> 1561                                         if (sectorsize <= 0 ||
> 1562                                             !ispow2(sectorsize))
> 1563                                                 illegal(value, "s
> sectsize");
> 
> 3072 is not a power of two (illegal value)

Yes. That are the places where different error messges are printed.
I meant If there is no more info for a message than the other, It's
better that the messages are the same.

Thanks a lot!

regards,
wengang.

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