From: Francesco Cosoleto Date: Mon, 9 May 2011 14:00:36 +0000 (+0200) Subject: fdisk: accept digits-space-suffix format X-Git-Tag: v2.20-rc1~281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74396048953b33b706028537b14e4b6be38c259d;p=thirdparty%2Futil-linux.git fdisk: accept digits-space-suffix format This is for users who are used to separate with a space numbers from units. Signed-off-by: Francesco Cosoleto --- diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 640fb9dcad..f62fd0f324 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -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)))