summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Jezak <josejx@gentoo.org>2012-05-05 12:38:15 +0000
committerJoseph Jezak <josejx@gentoo.org>2012-05-05 12:38:15 +0000
commitab8621f07c6c5ceb478f115b176c7a9eff9ba623 (patch)
treefcc3de2233d09cd79d04c6dd8b8966157347003f /sys-boot
parentMask sys-fs/rar2fs because it's broken with upstream release of unrar-4.2.1 h... (diff)
downloadgentoo-2-ab8621f07c6c5ceb478f115b176c7a9eff9ba623.tar.gz
gentoo-2-ab8621f07c6c5ceb478f115b176c7a9eff9ba623.tar.bz2
gentoo-2-ab8621f07c6c5ceb478f115b176c7a9eff9ba623.zip
Update the stub functions to work with e2fsprogs-1.42.0.
(Portage version: 2.1.10.57/cvs/Linux x86_64)
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/yaboot/ChangeLog5
-rw-r--r--sys-boot/yaboot/files/yaboot-stubfuncs.patch46
2 files changed, 34 insertions, 17 deletions
diff --git a/sys-boot/yaboot/ChangeLog b/sys-boot/yaboot/ChangeLog
index d3915d6dd758..ab9a2e1e4f82 100644
--- a/sys-boot/yaboot/ChangeLog
+++ b/sys-boot/yaboot/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-boot/yaboot
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.40 2012/05/02 06:20:54 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.41 2012/05/05 12:38:15 josejx Exp $
+
+ 05 May 2012; Joseph Jezak <josejx@gentoo.org> files/yaboot-stubfuncs.patch:
+ Update the stub functions to work with e2fsprogs-1.42.0.
02 May 2012; Joseph Jezak <josejx@gentoo.org> yaboot-1.3.17-r1.ebuild:
Change to EAPI-2, move the patching to src_prepare, add e2fsprogs static-libs
diff --git a/sys-boot/yaboot/files/yaboot-stubfuncs.patch b/sys-boot/yaboot/files/yaboot-stubfuncs.patch
index b315cc684c7d..ae78202bde37 100644
--- a/sys-boot/yaboot/files/yaboot-stubfuncs.patch
+++ b/sys-boot/yaboot/files/yaboot-stubfuncs.patch
@@ -1,8 +1,8 @@
diff --git a/lib/malloc.c b/lib/malloc.c
-index 0121112..d077630 100644
+index 0121112..e6b29c4 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
-@@ -64,6 +64,17 @@ void *malloc (unsigned int size)
+@@ -64,6 +64,15 @@ void *malloc (unsigned int size)
return caddr;
}
@@ -15,20 +15,19 @@ index 0121112..d077630 100644
+ return caddr;
+}
+
-+
-+
/* Do not fall back to the malloc above as posix_memalign is needed by
* external libraries not yaboot */
int posix_memalign(void **memptr, size_t alignment, size_t size)
diff --git a/lib/nonstd.c b/lib/nonstd.c
-index 5aeb0cb..0a13246 100644
+index 5aeb0cb..b536180 100644
--- a/lib/nonstd.c
+++ b/lib/nonstd.c
-@@ -65,3 +65,131 @@ char *getenv(const char *name)
+@@ -65,3 +65,147 @@ char *getenv(const char *name)
{
return NULL;
}
+
++// I tried to use prom functions for these...
+int open(const char *pathname, int flags) {
+ return (int) prom_open((char *)pathname);
+}
@@ -41,14 +40,6 @@ index 5aeb0cb..0a13246 100644
+ return (int) prom_open((char *)__path);
+}
+
-+int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) {
-+ return 0;
-+}
-+
-+int __fxstat64 (int __ver, int __filedesc, struct stat64 *__stat_buf) {
-+ return 0;
-+}
-+
+int read(int fd, void *buf, size_t count) {
+ return prom_read((void *)fd, buf, count);
+}
@@ -60,6 +51,7 @@ index 5aeb0cb..0a13246 100644
+
+void exit(int status) {
+ prom_exit();
++ return;
+}
+
+int __printf_chk(int flag, const char *format, ...) {
@@ -94,8 +86,23 @@ index 5aeb0cb..0a13246 100644
+ return memcpy(dest, src, n);
+}
+
++// But these are all dummy functions
++int __xstat64 (int __ver, const char *__filename, void *__stat_buf) {
++ return 0;
++}
++
++int stat64(const char *path, void *stat_buf) {
++ return 0;
++}
++
++int fstat64(int fildes, void *stat_buf) {
++ return 0;
++}
++
++int __fxstat64 (int __ver, int __filedesc, void *__stat_buf) {
++ return 0;
++}
+
-+// Dummy functions
+signed int random(void) {
+ return 0;
+}
@@ -104,6 +111,14 @@ index 5aeb0cb..0a13246 100644
+ return;
+}
+
++int rand(void) {
++ return 0;
++}
++
++void srand(unsigned int seed) {
++ return;
++}
++
+unsigned int sleep(unsigned int seconds) {
+ return 0;
+}
@@ -148,7 +163,6 @@ index 5aeb0cb..0a13246 100644
+ return prom_lseek ((void *)fd, whence + offset);
+}
+
-+// Stubbed ...
+size_t fwrite(const void *ptr, size_t size, size_t nmemb, void *stream) {
+ return 0;
+}