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>
This commit is contained in:
Francesco Cosoleto 2011-05-09 16:00:36 +02:00 committed by Karel Zak
parent f82ce2aab1
commit 7439604895
1 changed files with 3 additions and 0 deletions

View 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)))