From 2b9130c36b7e2bb2e1d43ae167d8e329c735e07f Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 21 Nov 2008 14:51:48 +0000 Subject: [PATCH] - fix #472502 - problem with fdisk and use +sectors for the end of partition --- util-linux-ng-2.14-fdisk-cylinder.patch | 30 +++++++++++++++++++++++++ util-linux-ng.spec | 8 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.14-fdisk-cylinder.patch diff --git a/util-linux-ng-2.14-fdisk-cylinder.patch b/util-linux-ng-2.14-fdisk-cylinder.patch new file mode 100644 index 0000000..98891f3 --- /dev/null +++ b/util-linux-ng-2.14-fdisk-cylinder.patch @@ -0,0 +1,30 @@ + + Upstream patch: + + commit 5ea8931c95b2e0b1663f28591d2c721f07a88181 + Author: Karel Zak + Date: Thu Nov 13 23:08:34 2008 +0100 + +diff -up util-linux-ng-2.14.1/fdisk/fdisk.c.kzak util-linux-ng-2.14.1/fdisk/fdisk.c +--- util-linux-ng-2.14.1/fdisk/fdisk.c.kzak 2008-11-21 14:27:19.000000000 +0100 ++++ util-linux-ng-2.14.1/fdisk/fdisk.c 2008-11-21 15:10:07.000000000 +0100 +@@ -1193,7 +1193,8 @@ read_int(unsigned int low, unsigned int + */ + if (!display_in_cyl_units) + i *= heads * sectors; +- } else if (*(line_ptr + 1) == 'B' && ++ } else if (*line_ptr && ++ *(line_ptr + 1) == 'B' && + *(line_ptr + 2) == '\0') { + /* + * 10^N +@@ -1206,7 +1207,8 @@ read_int(unsigned int low, unsigned int + absolute = 1000000000; + else + absolute = -1; +- } else if (*(line_ptr + 1) == '\0') { ++ } else if (*line_ptr && ++ *(line_ptr + 1) == '\0') { + /* + * 2^N + */ diff --git a/util-linux-ng.spec b/util-linux-ng.spec index b7ce91c..7137cae 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -2,7 +2,7 @@ Summary: A collection of basic system utilities Name: util-linux-ng Version: 2.14.1 -Release: 3%{?dist} +Release: 3.1%{?dist} License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng @@ -101,6 +101,8 @@ Patch10: util-linux-ng-2.14-blockdev-rmpart.patch Patch11: util-linux-ng-2.14-mount-file_t.patch # 465761: mount manpage is missing uid/gid mount options for tmpfs (upstream patch) Patch12: util-linux-ng-2.14-mount-man-tmpfs.patch +# 472502: Problem with fdisk and use +sectors for the end of partition (upstream patch) +Patch13: util-linux-ng-2.14-fdisk-cylinder.patch %description The util-linux-ng package contains a large variety of low-level system @@ -124,6 +126,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -516,6 +519,9 @@ exit 0 /sbin/losetup %changelog +* Fri Nov 21 2008 Karel Zak 2.14.1-3.1 +- fix #472502 - problem with fdisk and use +sectors for the end of partition + * Mon Oct 6 2008 Karel Zak 2.14.1-3 - fix #465761 - mount manpage is missing uid/gid mount options for tmpfs - refresh util-linux-ng-2.14-mount-file_t.patch (fuzz=0)