3
0
forked from pool/util-linux
util-linux/util-linux-2.14.1-fdisk_cylinder.patch

17 lines
642 B
Diff

Index: util-linux-ng-2.14.1/fdisk/fdisk.c
===================================================================
--- util-linux-ng-2.14.1.orig/fdisk/fdisk.c 2008-11-05 16:38:11.000000000 +0100
+++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-05 17:23:30.000000000 +0100
@@ -1186,8 +1186,9 @@ read_int(unsigned int low, unsigned int
while(isspace(*(line_ptr + suflen)))
*(line_ptr + suflen--) = '\0';
- if ((*line_ptr == 'C' || *line_ptr == 'c') &&
- *(line_ptr + 1) == '\0') {
+ if (((*line_ptr == 'C' || *line_ptr == 'c') &&
+ *(line_ptr + 1) == '\0') ||
+ *line_ptr == '\0') {
/*
* Cylinders
*/