Gitweb:
http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 37106358f84c727f9419255e5fd5e2424dda8462
Parent: 294ae98e0c60e8d559579e6a507d87d8aa2bacc1
Author: Carlos Maiolino <cmaiolino(a)redhat.com>
AuthorDate: Thu Jul 7 11:38:08 2011 -0300
Committer: Carlos Maiolino <cmaiolino(a)redhat.com>
CommitterDate: Thu Jul 7 11:38:08 2011 -0300
mkfs: Change hardcoded numbers by new macro definitions
The verify_arguments() function makes use of some hardcoded
integers that would best fit as macros.
---
gfs2/mkfs/main_mkfs.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index db2309a..b0bb6e3 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -332,12 +332,11 @@ static void verify_arguments(struct gfs2_sbd *sdp)
{
if (!sdp->expert)
test_locking(sdp->lockproto, sdp->locktable);
- /* Look at this! Why can't we go bigger than 2GB? */
if (sdp->expert) {
- if (1 > sdp->rgsize || sdp->rgsize > 2048)
+ if (GFS2_EXP_MIN_RGSIZE > sdp->rgsize || sdp->rgsize > GFS2_MAX_RGSIZE)
die( _("bad resource group size\n"));
} else {
- if (32 > sdp->rgsize || sdp->rgsize > 2048)
+ if (GFS2_MIN_RGSIZE > sdp->rgsize || sdp->rgsize > GFS2_MAX_RGSIZE)
die( _("bad resource group size\n"));
}