diff options
author | Awal Garg | 2018-07-28 15:20:35 +0200 |
---|---|---|
committer | Karel Zak | 2018-07-31 14:54:12 +0200 |
commit | 757cefbb61dd22254ae8441f7caed39be7c59483 (patch) | |
tree | 419734d3d5afd00ffc9f8ebc6bdca2d2796783d6 /disk-utils/fdisk.c | |
parent | hwclock: remove ntpd from man page (diff) | |
download | kernel-qcow2-util-linux-757cefbb61dd22254ae8441f7caed39be7c59483.tar.gz kernel-qcow2-util-linux-757cefbb61dd22254ae8441f7caed39be7c59483.tar.xz kernel-qcow2-util-linux-757cefbb61dd22254ae8441f7caed39be7c59483.zip |
libfdisk: Accept negative numbers for last sector input
[kzak@redhat.com: - add note to the man page
- add '-' to the dialog query
- cleanup functions names and libfdisk.sym]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk.c')
-rw-r--r-- | disk-utils/fdisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 73525fa51..ed4db8bd0 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -357,6 +357,8 @@ static int ask_offset(struct fdisk_context *cxt, } if (sig == '+') num += base; + else if (sig == '-' && fdisk_ask_number_is_wrap_negative(ask)) + num = high - num; else if (sig == '-') num = base - num; |