diff options
| author | Michael Brown | 2006-03-17 15:09:45 +0100 |
|---|---|---|
| committer | Michael Brown | 2006-03-17 15:09:45 +0100 |
| commit | a2b15fd1febc77aecfc99b9d366b13f0bc17bebd (patch) | |
| tree | 47cef6e48756f1d39f6404af8de70023a72c10bb /src/filo/main/lib.c | |
| parent | Prefix semantics have changed (diff) | |
| download | ipxe-a2b15fd1febc77aecfc99b9d366b13f0bc17bebd.tar.gz ipxe-a2b15fd1febc77aecfc99b9d366b13f0bc17bebd.tar.xz ipxe-a2b15fd1febc77aecfc99b9d366b13f0bc17bebd.zip | |
GPXE code cleanup and purge.
Diffstat (limited to 'src/filo/main/lib.c')
| -rw-r--r-- | src/filo/main/lib.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/filo/main/lib.c b/src/filo/main/lib.c deleted file mode 100644 index 6e5020c7e..000000000 --- a/src/filo/main/lib.c +++ /dev/null @@ -1,56 +0,0 @@ - -#include <etherboot.h> -#include <lib.h> - -char *strdup(const char *s) -{ - size_t sz = strlen(s) + 1; - char *d = allot(sz); - memcpy(d, s, sz); - return d; -} - -int isspace(int c) -{ - switch (c) { - case ' ': case '\f': case '\n': - case '\r': case '\t': case '\v': - return 1; - default: - return 0; - } -} - -unsigned int get_le32(const unsigned char *p) -{ - return ((unsigned int) p[0] << 0) - | ((unsigned int) p[1] << 8) - | ((unsigned int) p[2] << 16) - | ((unsigned int) p[3] << 24); -} - -unsigned int get_le16(const unsigned char *p) -{ - return ((unsigned int) p[0] << 0) - | ((unsigned int) p[1] << 8); -} -#if (DEBUG_ALL || DEBUG_ELFBOOT || DEBUG_ELFNOTE || DEBUG_LINUXBIOS || \ - DEBUG_MALLOC || DEBUG_MULTIBOOT || DEBUG_SEGMENT || DEBUG_SYS_INFO ||\ - DEBUG_TIMER || DEBUG_BLOCKDEV || DEBUG_PCI || DEBUG_LINUXLOAD ||\ - DEBUG_IDE || DEBUG_ELTORITO) - -// It is needed by debug for filo -void hexdump(const void *p, unsigned int len) -{ - int i; - const unsigned char *q = p; - - for (i = 0; i < len; i++) { - if (i%16==0) - printf("%04x: ", i); - printf("%02x%c", q[i], i%16==15 ? '\n' : i%8==7 ? '-' : ' '); - } - if (i%16 != 0) - putchar('\n'); -} -#endif |
