From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p87FmqrJ169226 for ; Wed, 7 Sep 2011 10:48:52 -0500 From: Lukas Czerner Subject: [PATCH 2/2 v2][xfstests] fstrim: Use strtoull instead of strtoul Date: Wed, 7 Sep 2011 17:48:43 +0200 Message-Id: <1315410523-23925-2-git-send-email-lczerner@redhat.com> In-Reply-To: <1315410523-23925-1-git-send-email-lczerner@redhat.com> References: <1315410523-23925-1-git-send-email-lczerner@redhat.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com Cc: Lukas Czerner , aelder@sgi.com When we are parsing input arguments we should really use stroull to get unsigned long long numbers, since this is what we can specify on the command line. With this fix it should parse long numbers on the 32 bit architecture correctly. Signed-off-by: Lukas Czerner --- v2: nothing has changed src/fstrim.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/fstrim.c b/src/fstrim.c index f1f37ec..e23bcb3 100644 --- a/src/fstrim.c +++ b/src/fstrim.c @@ -97,7 +97,7 @@ static unsigned long long get_number(char **optarg) } errno = 0; - number = strtoul(opt, &end , 0); + number = strtoull(opt, &end , 0); if (errno) err_exit("%s: %s (%s)\n", program_name, strerror(errno), *optarg); -- 1.7.4.4 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs