diff options
author | Francesco Cosoleto | 2011-05-09 16:00:36 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-10 14:33:33 +0200 |
commit | 74396048953b33b706028537b14e4b6be38c259d (patch) | |
tree | dbcedb57fc8f286894c969d23604a0cd1813c392 /fdisk | |
parent | chrt.1: fix grammar (diff) | |
download | kernel-qcow2-util-linux-74396048953b33b706028537b14e4b6be38c259d.tar.gz kernel-qcow2-util-linux-74396048953b33b706028537b14e4b6be38c259d.tar.xz kernel-qcow2-util-linux-74396048953b33b706028537b14e4b6be38c259d.zip |
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 <cosoleto@gmail.com>
Diffstat (limited to 'fdisk')
-rw-r--r-- | fdisk/fdisk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 640fb9dca..f62fd0f32 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))) |