]> err.no Git - util-linux/commitdiff
addpart: use atoll() for parsing command line arguments
authorThomas Fehr <fehr@suse.de>
Tue, 11 May 2010 15:09:46 +0000 (17:09 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 13 May 2010 08:33:52 +0000 (10:33 +0200)
Addresses: http://bugzilla.novell.com/show_bug.cgi?id=603328
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
partx/addpart.c

index 004fee537a8f6fba30f1e305d021c92185b4a4fd..112a2860cebd1385bdbcdd576c8bf42055b85369 100644 (file)
@@ -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;