diff options
author | Feng Tang <feng.tang@intel.com> | 2010-08-20 11:56:58 +0800 |
---|---|---|
committer | Feng Tang <feng.tang@intel.com> | 2010-08-26 16:44:15 +0800 |
commit | 626c8a3653878d0ed0dc1280dd8dd2434d041551 (patch) | |
tree | b2ac6a94025f429da7208ffd50064c3e3c0c98f4 | |
parent | a08e149bf3abd29ed87ebc01dbb96207f515a0cf (diff) | |
download | syslinux-626c8a3653878d0ed0dc1280dd8dd2434d041551.tar.gz |
elflink: remove all __com32.cs_pm from com32/
We don't need these wrappers any more, as we can directly call
those APIs from core lib
-rw-r--r-- | com32/lib/chdir.c | 15 | ||||
-rw-r--r-- | com32/lib/getcwd.c | 2 | ||||
-rw-r--r-- | com32/lib/lmalloc.c | 6 | ||||
-rw-r--r-- | com32/lib/sys/fileclose.c | 2 | ||||
-rw-r--r-- | com32/lib/sys/fileread.c | 4 | ||||
-rw-r--r-- | com32/lib/sys/open.c | 3 | ||||
-rw-r--r-- | com32/lib/sys/readdir.c | 30 | ||||
-rw-r--r-- | com32/lib/sys/times.c | 2 | ||||
-rw-r--r-- | com32/lib/syslinux/idle.c | 4 |
9 files changed, 11 insertions, 57 deletions
diff --git a/com32/lib/chdir.c b/com32/lib/chdir.c deleted file mode 100644 index 00670e35..00000000 --- a/com32/lib/chdir.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - * chdir.c - */ - -#include <dirent.h> -#include <stdio.h> -#include <errno.h> - -#include <com32.h> -#include <syslinux/pmapi.h> - -int chdir(const char *path) -{ - return __com32.cs_pm->chdir(path); -} diff --git a/com32/lib/getcwd.c b/com32/lib/getcwd.c index 5ce62ec0..2939c07c 100644 --- a/com32/lib/getcwd.c +++ b/com32/lib/getcwd.c @@ -7,5 +7,5 @@ char *getcwd(char *buf, size_t size) { - return __com32.cs_pm->getcwd(buf, size); + return core_getcwd(buf, size); } diff --git a/com32/lib/lmalloc.c b/com32/lib/lmalloc.c index 69438bdc..9d532c80 100644 --- a/com32/lib/lmalloc.c +++ b/com32/lib/lmalloc.c @@ -34,7 +34,7 @@ void *clmalloc(size_t size) { void *p; - p = __com32.cs_pm->lmalloc(size); + p = lmalloc(size); if (!p) errno = ENOMEM; return p; @@ -43,7 +43,7 @@ void *clmalloc(size_t size) void *lzalloc(size_t size) { void *p; - p = __com32.cs_pm->lmalloc(size); + p = lmalloc(size); if (!p) errno = ENOMEM; else @@ -53,5 +53,5 @@ void *lzalloc(size_t size) void lfree(void *ptr) { - __com32.cs_pm->lfree(ptr); + free(ptr); } diff --git a/com32/lib/sys/fileclose.c b/com32/lib/sys/fileclose.c index e2c929f2..26e15082 100644 --- a/com32/lib/sys/fileclose.c +++ b/com32/lib/sys/fileclose.c @@ -39,7 +39,7 @@ int __file_close(struct file_info *fp) { if (fp->i.fd.handle) - __com32.cs_pm->close_file(fp->i.fd.handle); + close_file(fp->i.fd.handle); return 0; } diff --git a/com32/lib/sys/fileread.c b/com32/lib/sys/fileread.c index aab99c80..7d9e1b91 100644 --- a/com32/lib/sys/fileread.c +++ b/com32/lib/sys/fileread.c @@ -42,7 +42,7 @@ int __file_get_block(struct file_info *fp) { ssize_t bytes_read; - bytes_read = __com32.cs_pm->read_file(&fp->i.fd.handle, fp->i.buf, + bytes_read = pmapi_read_file(&fp->i.fd.handle, fp->i.buf, MAXBLOCK >> fp->i.fd.blocklg2); if (!bytes_read) { errno = EIO; @@ -67,7 +67,7 @@ ssize_t __file_read(struct file_info * fp, void *buf, size_t count) if (count > MAXBLOCK) { /* Large transfer: copy directly, without buffering */ - ncopy = __com32.cs_pm->read_file(&fp->i.fd.handle, bufp, + ncopy = pmapi_read_file(&fp->i.fd.handle, bufp, count >> fp->i.fd.blocklg2); if (!ncopy) { errno = EIO; diff --git a/com32/lib/sys/open.c b/com32/lib/sys/open.c index 1d7677bc..a071c61b 100644 --- a/com32/lib/sys/open.c +++ b/com32/lib/sys/open.c @@ -63,8 +63,7 @@ int open(const char *pathname, int flags, ...) return -1; fp = &__file_info[fd]; - - handle = __com32.cs_pm->open_file(pathname, &fp->i.fd); + handle = open_file(pathname, &fp->i.fd); if (handle < 0) return -1; diff --git a/com32/lib/sys/readdir.c b/com32/lib/sys/readdir.c deleted file mode 100644 index d2a8c039..00000000 --- a/com32/lib/sys/readdir.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * readdir.c - */ - -#include <dirent.h> -#include <stdio.h> -#include <errno.h> - -#include <com32.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <stdlib.h> - -#include <syslinux/pmapi.h> - -DIR *opendir(const char *pathname) -{ - return __com32.cs_pm->opendir(pathname); -} - -struct dirent *readdir(DIR *dir) -{ - return __com32.cs_pm->readdir(dir); -} - -int closedir(DIR *dir) -{ - return __com32.cs_pm->closedir(dir); -} diff --git a/com32/lib/sys/times.c b/com32/lib/sys/times.c index dd063f37..518ba822 100644 --- a/com32/lib/sys/times.c +++ b/com32/lib/sys/times.c @@ -38,5 +38,5 @@ clock_t times(struct tms * buf) { (void)buf; - return *__com32.cs_pm->ms_timer; + return __ms_timer; } diff --git a/com32/lib/syslinux/idle.c b/com32/lib/syslinux/idle.c index ddaa7fcd..6413d331 100644 --- a/com32/lib/syslinux/idle.c +++ b/com32/lib/syslinux/idle.c @@ -38,10 +38,10 @@ void syslinux_reset_idle(void) { - __com32.cs_pm->reset_idle(); + reset_idle(); } void syslinux_idle(void) { - __com32.cs_pm->idle(); + __idle(); } |