[syslinux:elflink] elflink: remove all __com32.cs_pm from com32/
syslinux-bot for Feng Tang
feng.tang at intel.com
Thu Aug 26 21:57:09 PDT 2010
Commit-ID: 626c8a3653878d0ed0dc1280dd8dd2434d041551
Gitweb: http://syslinux.zytor.com/commit/626c8a3653878d0ed0dc1280dd8dd2434d041551
Author: Feng Tang <feng.tang at intel.com>
AuthorDate: Fri, 20 Aug 2010 11:56:58 +0800
Committer: Feng Tang <feng.tang at intel.com>
CommitDate: Thu, 26 Aug 2010 16:44:15 +0800
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
---
com32/lib/chdir.c | 15 ---------------
com32/lib/getcwd.c | 2 +-
com32/lib/lmalloc.c | 6 +++---
com32/lib/sys/fileclose.c | 2 +-
com32/lib/sys/fileread.c | 4 ++--
com32/lib/sys/open.c | 3 +--
com32/lib/sys/readdir.c | 30 ------------------------------
com32/lib/sys/times.c | 2 +-
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 00670e3..0000000
--- 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 5ce62ec..2939c07 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 69438bd..9d532c8 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 e2c929f..26e1508 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 aab99c8..7d9e1b9 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 1d7677b..a071c61 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 d2a8c03..0000000
--- 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 dd063f3..518ba82 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 ddaa7fc..6413d33 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();
}
More information about the Syslinux-commits
mailing list