]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: accept digits-space-suffix format
authorFrancesco Cosoleto <cosoleto@gmail.com>
Mon, 9 May 2011 14:00:36 +0000 (16:00 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 10 May 2011 12:33:33 +0000 (14:33 +0200)
This is for users who are used to separate with a space numbers from units.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
fdisk/fdisk.c

index 640fb9dcadce2dfe78929867c96bd2ced651cf75..f62fd0f324b2dac7583865fe51d36cec21664923 100644 (file)
@@ -1435,6 +1435,9 @@ read_int_sx(unsigned int low, unsigned int dflt, unsigned int high,
                        while (isdigit(*++line_ptr))
                                use_default = 0;
 
+                       while (isspace(*line_ptr))
+                               line_ptr++;
+
                        suflen = strlen(line_ptr) - 1;
 
                        while(isspace(*(line_ptr + suflen)))