Re: [PATCH] partx: use atoll() for parsing command line arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 11, 2010 at 05:09:46PM +0200, Petr Uzel wrote:
>Hi,
>
>this patch fixes https://bugzilla.novell.com/show_bug.cgi?id=603328
>
>Regards,
>
>Petr
>
>
>From: Thomas Fehr <fehr@xxxxxxx>
>
>Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>

ACKed-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>

Thanks.


>---
> partx/addpart.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/partx/addpart.c b/partx/addpart.c
>index 004fee5..112a286 100644
>--- a/partx/addpart.c
>+++ b/partx/addpart.c
>@@ -25,8 +25,8 @@ main(int argc, char **argv){
> 		exit(1);
> 	}
> 	p.pno = atoi(argv[2]);
>-	p.start = 512 * ((long long) atol(argv[3]));
>-	p.length = 512 * ((long long) atol(argv[4]));
>+	p.start = 512 * atoll(argv[3]);
>+	p.length = 512 * atoll(argv[4]);
> 	p.devname[0] = 0;
> 	p.volname[0] = 0;
> 	a.op = BLKPG_ADD_PARTITION;
>-- 
>1.6.4.2
>
>
>Petr
>
>--
>Petr Uzel
>IRC: ptr_uzl @ freenode


--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux