Patrick Georgi ([email protected]) just uploaded a new patch set to 
gerrit, which you can find at http://review.coreboot.org/86

-gerrit

commit 0cda4b86f6b9aa1dd8acdd733bca92d801627717
Author: Patrick Georgi <[email protected]>
Date:   Fri May 27 15:31:52 2011 +0200

    libpayload: Provide atol(), malloc.h
    
    Change-Id: I807ca061115146a6851eef481eb881b279fba8e1
    Signed-off-by: Patrick Georgi <[email protected]>
---
 payloads/libpayload/include/malloc.h |    1 +
 payloads/libpayload/include/stdlib.h |    1 +
 payloads/libpayload/libc/string.c    |    5 +++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/payloads/libpayload/include/malloc.h 
b/payloads/libpayload/include/malloc.h
new file mode 100644
index 0000000..c8b49f2
--- /dev/null
+++ b/payloads/libpayload/include/malloc.h
@@ -0,0 +1 @@
+#include <stdlib.h>
diff --git a/payloads/libpayload/include/stdlib.h 
b/payloads/libpayload/include/stdlib.h
index a106607..6fb73ad 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -120,6 +120,7 @@ void *memalign(size_t align, size_t size);
  */
 long int strtol(const char *s, char **nptr, int base);
 unsigned long int strtoul(const char *s, char **nptr, int base);
+long atol(const char *nptr);
 
 /** @} */
 
diff --git a/payloads/libpayload/libc/string.c 
b/payloads/libpayload/libc/string.c
index 2e0a558..8c6ea99 100644
--- a/payloads/libpayload/libc/string.c
+++ b/payloads/libpayload/libc/string.c
@@ -473,6 +473,11 @@ long int strtol(const char *ptr, char **endptr, int base)
         return ret * negative;
 }
 
+long atol(const char *nptr)
+{
+       return strtol(nptr, NULL, 10);
+}
+
 /**
  * Convert the initial portion of a string into an unsigned int
  * @param ptr A pointer to the string to convert

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to