[util-linux-ng/f14/master] 2.18-4.3: #641169 - cfdisk does not accept partition type
kzak
kzak at fedoraproject.org
Mon Oct 11 07:07:19 UTC 2010
commit ba161998dce8a4c9be9452e72a2714c8906e1350
Author: Karel Zak <kzak at redhat.com>
Date: Mon Oct 11 09:06:22 2010 +0200
2.18-4.3: #641169 - cfdisk does not accept partition type
Signed-off-by: Karel Zak <kzak at redhat.com>
util-linux-ng-2.18-cfdisk-parttype.patch | 57 ++++++++++++++++++++++++++++++
util-linux-ng.spec | 8 ++++-
2 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/util-linux-ng-2.18-cfdisk-parttype.patch b/util-linux-ng-2.18-cfdisk-parttype.patch
new file mode 100644
index 0000000..65a6b90
--- /dev/null
+++ b/util-linux-ng-2.18-cfdisk-parttype.patch
@@ -0,0 +1,57 @@
+From 54a0fe298b4d6d948cffbd6fbbbe7dbabc9a6bb1 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Mon, 19 Jul 2010 22:52:58 +0200
+Subject: [PATCH] cfdisk: get_string not calculating correct limits
+
+Reported-by: James L. Hammons <jlhamm at acm.org>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ fdisk/cfdisk.c | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
+index 7fa0b19..e7955fe 100644
+--- a/fdisk/cfdisk.c
++++ b/fdisk/cfdisk.c
+@@ -421,6 +421,11 @@ fdexit(int ret) {
+ exit(ret);
+ }
+
++/*
++ * Note that @len is size of @str buffer.
++ *
++ * Returns number of read bytes (without \0).
++ */
+ static int
+ get_string(char *str, int len, char *def) {
+ size_t cells = 0, i = 0;
+@@ -472,7 +477,7 @@ get_string(char *str, int len, char *def) {
+ break;
+ default:
+ #if defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR)
+- if (i < len && iswprint(c)) {
++ if (i + 1 < len && iswprint(c)) {
+ wchar_t wc = (wchar_t) c;
+ char s[MB_CUR_MAX + 1];
+ int sz = wctomb(s, wc);
+@@ -492,7 +497,7 @@ get_string(char *str, int len, char *def) {
+ putchar(BELL);
+ }
+ #else
+- if (i < len && isprint(c)) {
++ if (i + 1 < len && isprint(c)) {
+ mvaddch(y, x + cells, c);
+ if (use_def) {
+ clrtoeol();
+@@ -2405,7 +2410,7 @@ change_id(int i) {
+
+ sprintf(def, "%02X", new_id);
+ mvaddstr(COMMAND_LINE_Y, COMMAND_LINE_X, _("Enter filesystem type: "));
+- if ((len = get_string(id, 2, def)) <= 0 && len != GS_DEFAULT)
++ if ((len = get_string(id, 3, def)) <= 0 && len != GS_DEFAULT)
+ return;
+
+ if (len != GS_DEFAULT) {
+--
+1.7.3.1
+
diff --git a/util-linux-ng.spec b/util-linux-ng.spec
index 5e436f2..34631b9 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.18
-Release: 4.2%{?dist}
+Release: 4.3%{?dist}
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -123,6 +123,8 @@ Patch13: util-linux-ng-2.18-libmount-optsmerge.patch
Patch14: util-linux-ng-blkid-HFS.patch
# 625064 - fuse-sshfs mounts are not displayed in Nautilus
Patch15: util-linux-ng-2.18-mount-subtype.patch
+# 641169 - cfdisk does not accept two-character partition type
+Patch16: util-linux-ng-2.18-cfdisk-parttype.patch
%description
The util-linux-ng package contains a large variety of low-level system
@@ -244,6 +246,7 @@ cp %{SOURCE8} %{SOURCE9} .
%patch13 -p1
%patch14 -p1
%patch15 -p1
+%patch16 -p1
%build
unset LINGUAS || :
@@ -780,6 +783,9 @@ fi
%changelog
+* Mon Oct 11 2010 Karel Zak <kzak at redhat.com> 2.18-4.3
+- fix #641169 - cfdisk does not accept two-character partition type
+
* Thu Oct 7 2010 Karel Zak <kzak at redhat.com> 2.18-4.2
- fix #538551 - Dual-filesystem (ISO9660/HFS) CD-ROMs not mounted automatically
- fix #625064 - fuse-sshfs mounts are not displayed in Nautilus
More information about the scm-commits
mailing list