summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2013-07-10 20:11:29 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2013-07-10 20:11:29 +0000
commitacb2f2bb37163837984d99c0b6f0eed77d236b94 (patch)
treece056a3a2f84edae461eecaf59372dc5a2a3e957 /sys-boot/efibootmgr
parentStable for x86, wrt bug #476344 (diff)
downloadgentoo-2-acb2f2bb37163837984d99c0b6f0eed77d236b94.tar.gz
gentoo-2-acb2f2bb37163837984d99c0b6f0eed77d236b94.tar.bz2
gentoo-2-acb2f2bb37163837984d99c0b6f0eed77d236b94.zip
Revision bump with error reporting patch. Now you can see error messages, not just return codes.
(Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)
Diffstat (limited to 'sys-boot/efibootmgr')
-rw-r--r--sys-boot/efibootmgr/ChangeLog12
-rw-r--r--sys-boot/efibootmgr/efibootmgr-0.5.4-r1.ebuild41
-rw-r--r--sys-boot/efibootmgr/files/efibootmgr-error-reporting.patch40
3 files changed, 90 insertions, 3 deletions
diff --git a/sys-boot/efibootmgr/ChangeLog b/sys-boot/efibootmgr/ChangeLog
index eb1cc275486c..5bc2713c7e3e 100644
--- a/sys-boot/efibootmgr/ChangeLog
+++ b/sys-boot/efibootmgr/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-boot/efibootmgr
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/efibootmgr/ChangeLog,v 1.22 2012/05/03 04:50:13 jdhore Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/efibootmgr/ChangeLog,v 1.23 2013/07/10 20:11:28 scarabeus Exp $
+
+*efibootmgr-0.5.4-r1 (10 Jul 2013)
+
+ 10 Jul 2013; Tomáš Chvátal <scarabeus@gentoo.org> +efibootmgr-0.5.4-r1.ebuild,
+ +files/efibootmgr-error-reporting.patch:
+ Revision bump with error reporting patch. Now you can see error messages, not
+ just return codes.
03 May 2012; Jeff Horelick <jdhore@gentoo.org> efibootmgr-0.5.4.ebuild:
dev-util/pkgconfig -> virtual/pkgconfig
@@ -78,4 +85,3 @@
files/efibootmgr-0.4.1-makefile.patch:
Add efibootmgr for IA-64. This program allows you to configure the EFI boot
partition on IA-64 systems
-
diff --git a/sys-boot/efibootmgr/efibootmgr-0.5.4-r1.ebuild b/sys-boot/efibootmgr/efibootmgr-0.5.4-r1.ebuild
new file mode 100644
index 000000000000..3dcfedaa4c5c
--- /dev/null
+++ b/sys-boot/efibootmgr/efibootmgr-0.5.4-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/efibootmgr/efibootmgr-0.5.4-r1.ebuild,v 1.1 2013/07/10 20:11:28 scarabeus Exp $
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs eutils
+
+DESCRIPTION="Interact with the EFI Boot Manager on IA-64 Systems"
+HOMEPAGE="http://developer.intel.com/technology/efi"
+SRC_URI="http://linux.dell.com/efibootmgr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE=""
+
+RDEPEND="sys-apps/pciutils"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e "/^LIBS/s:=.*:=$($(tc-getPKG_CONFIG) libpci --libs):" \
+ src/efibootmgr/module.mk || die
+
+ epatch "${FILESDIR}/${PN}-error-reporting.patch"
+}
+
+src_compile() {
+ strip-flags
+ tc-export CC
+ emake EXTRA_CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ # build system uses perl, so just do it ourselves
+ dosbin src/efibootmgr/efibootmgr
+ doman src/man/man8/efibootmgr.8
+ dodoc AUTHORS README doc/ChangeLog doc/TODO
+}
diff --git a/sys-boot/efibootmgr/files/efibootmgr-error-reporting.patch b/sys-boot/efibootmgr/files/efibootmgr-error-reporting.patch
new file mode 100644
index 000000000000..2c769db23047
--- /dev/null
+++ b/sys-boot/efibootmgr/files/efibootmgr-error-reporting.patch
@@ -0,0 +1,40 @@
+@@ -, +, @@
+---
+ src/lib/efivars_sysfs.c | 16 +++++++++++++---
+ 1 files changed, 13 insertions(+), 3 deletions(-)
+--- a/src/lib/efivars_sysfs.c
++++ a/src/lib/efivars_sysfs.c
+@@ -66,6 +66,7 @@ static efi_status_t
+ sysfs_write_variable(const char *filename, efi_variable_t *var)
+ {
+ int fd;
++ int rc = EFI_SUCCESS;
+ size_t writesize;
+ char buffer[PATH_MAX+40];
+
+@@ -77,12 +78,21 @@ sysfs_write_variable(const char *filename, efi_variable_t *var)
+ return EFI_INVALID_PARAMETER;
+ }
+ writesize = write(fd, var, sizeof(*var));
++ if (writesize == -1) {
++ if (errno == -ENOSPC)
++ rc = EFI_OUT_OF_RESOURCES;
++ else
++ rc = EFI_INVALID_PARAMETER;
++ goto out;
++ }
+ if (writesize != sizeof(*var)) {
+- close(fd);
+- return EFI_INVALID_PARAMETER;
++ rc = EFI_INVALID_PARAMETER;
+ }
++out:
++ if (rc != EFI_SUCCESS)
++ fprintf(stderr, "Failed to write variable: %s\n", strerror(errno));
+ close(fd);
+- return EFI_SUCCESS;
++ return rc;
+ }
+
+
+--