[PATCH 2/3] fdisk: accept digits-space-suffix format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is for users who are used to separate with a space numbers from units.

Signed-off-by: Francesco Cosoleto <cosoleto@xxxxxxxxx>
---
 fdisk/fdisk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index c88af0c..201b2f4 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)))
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux