summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2010-01-13 12:13:17 +0000
committerTony Vroon <chainsaw@gentoo.org>2010-01-13 12:13:17 +0000
commit9af8b58ab3fc5f31634074a0ae1aeae2e4340b82 (patch)
tree007603ede4f7a762c68808a29eea0442d72036fa /sys-apps/arrayprobe
parentRevision bump. (diff)
downloadgentoo-2-9af8b58ab3fc5f31634074a0ae1aeae2e4340b82.tar.gz
gentoo-2-9af8b58ab3fc5f31634074a0ae1aeae2e4340b82.tar.bz2
gentoo-2-9af8b58ab3fc5f31634074a0ae1aeae2e4340b82.zip
Patch scavenged from Ubuntu by Tobias "Blackb|rd" Klausmann <klausman@gentoo.org> resolves a misplaced bracket in a strlen statement and removes a malloc that does not belong. From bug #300819.
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/arrayprobe')
-rw-r--r--sys-apps/arrayprobe/ChangeLog12
-rw-r--r--sys-apps/arrayprobe/arrayprobe-2.0-r1.ebuild24
-rw-r--r--sys-apps/arrayprobe/files/2.0-malloc-strlen.patch20
3 files changed, 54 insertions, 2 deletions
diff --git a/sys-apps/arrayprobe/ChangeLog b/sys-apps/arrayprobe/ChangeLog
index cde384f680b3..2c429e848a30 100644
--- a/sys-apps/arrayprobe/ChangeLog
+++ b/sys-apps/arrayprobe/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/arrayprobe
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/arrayprobe/ChangeLog,v 1.3 2006/12/23 22:41:11 peper Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/arrayprobe/ChangeLog,v 1.4 2010/01/13 12:13:17 chainsaw Exp $
+
+*arrayprobe-2.0-r1 (13 Jan 2010)
+
+ 13 Jan 2010; <chainsaw@gentoo.org> +files/2.0-malloc-strlen.patch,
+ +arrayprobe-2.0-r1.ebuild:
+ Patch scavenged from Ubuntu by Tobias "Blackb rd" Klausmann
+ <klausman@gentoo.org> resolves a misplaced bracket in a strlen statement
+ and removes a malloc that does not belong. From bug #300819.
23 Dec 2006; Piotr Jaroszyński <peper@gentoo.org> arrayprobe-2.0.ebuild:
Add ~amd64 wrt bug #157911.
diff --git a/sys-apps/arrayprobe/arrayprobe-2.0-r1.ebuild b/sys-apps/arrayprobe/arrayprobe-2.0-r1.ebuild
new file mode 100644
index 000000000000..0b7b1e74a2b5
--- /dev/null
+++ b/sys-apps/arrayprobe/arrayprobe-2.0-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/arrayprobe/arrayprobe-2.0-r1.ebuild,v 1.1 2010/01/13 12:13:17 chainsaw Exp $
+
+inherit eutils
+
+DESCRIPTION="CLI utility that reports the status of a HP (Compaq) array controller (both IDA & CCISS supported)."
+HOMEPAGE="http://www.strocamp.net/opensource/arrayprobe.php"
+SRC_URI="http://www.strocamp.net/opensource/compaq/downloads/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="virtual/linux-sources"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PV}-malloc-strlen.patch"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+}
diff --git a/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch b/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch
new file mode 100644
index 000000000000..8d955a8f933d
--- /dev/null
+++ b/sys-apps/arrayprobe/files/2.0-malloc-strlen.patch
@@ -0,0 +1,20 @@
+--- probe.c.old 2010-01-13 12:15:32.000000000 +0100
++++ probe.c 2010-01-13 12:16:44.000000000 +0100
+@@ -354,7 +354,7 @@
+ int drivenum = event.detail.logstatchange.logicaldrivenumber;
+ logdrvs[drivenum].state.state = event.detail.logstatchange.newlogicaldrivestate;
+ logdrvs[drivenum].state.severity = logicaldrivestatusseverity[event.detail.logstatchange.newlogicaldrivestate];
+- logdrvs[drivenum].state.message = (char *)malloc(strlen(logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate] + 1));
++ logdrvs[drivenum].state.message = (char *)malloc(strlen(logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate]) + 1);
+ strcpy (logdrvs[drivenum].state.message, logicaldrivestatusstr[event.detail.logstatchange.newlogicaldrivestate]);
+ }
+ if (verbose) {
+@@ -479,7 +479,7 @@
+ int ida_device = 0; /* only for use with -f , used to determine protocol to use */
+ int max_logical = 64; /* hardcoded */
+ int cur_logical = 0; /* number of drives detected */
+- logdrv *logdrvs = (logdrv *)malloc(sizeof(logdrv)*max_logical);
++ logdrv *logdrvs;
+ int worst_disk;
+ int worst_sev = SEV_NORMAL;
+ int cntr;