aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/getcwd.c
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-07-14 10:57:18 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:04 +0800
commit3400a8754214f4cd69d49d85c0396665d7a6415f (patch)
tree8e6218d779196123eb368b136d91ae55ad2bc418 /com32/lib/getcwd.c
parent967eb65904c0de527fccee529187bf0dcb4af989 (diff)
downloadsyslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.tar.gz
syslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.tar.xz
syslinux-3400a8754214f4cd69d49d85c0396665d7a6415f.zip
elflink: add more change as show below
com32/lib/chdir.c com32/lib/getcwd.c com32/lib/getopt.c com32/lib/pci/scan.c com32/lib/sys/farcall.c com32/lib/sys/times.c com32/lib/sys/vesa/background.c com32/lib/sys/vesa/screencpy.c com32/lib/vdprintf.c com32/rosh/rosh.c com32/rosh/rosh.h com32/sysdump/backend.h com32/sysdump/be_tftp.c com32/sysdump/main.c com32/sysdump/memmap.c com32/sysdump/sysdump.h com32/sysdump/vesa.c doc/comboot.txt doc/extlinux.txt doc/gpt.txt doc/memdisk.txt doc/menu.txt doc/syslinux.txt
Diffstat (limited to 'com32/lib/getcwd.c')
-rw-r--r--com32/lib/getcwd.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/com32/lib/getcwd.c b/com32/lib/getcwd.c
index 38fae52a..5ce62ec0 100644
--- a/com32/lib/getcwd.c
+++ b/com32/lib/getcwd.c
@@ -2,29 +2,10 @@
* getcwd.c
*/
-#include <syslinux/config.h>
-#include <klibc/compiler.h>
#include <com32.h>
-
-#include <dirent.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
+#include <syslinux/pmapi.h>
char *getcwd(char *buf, size_t size)
{
- static com32sys_t reg;
- char *pwdstr, *ret;
-
- reg.eax.w[0] = 0x001f;
- __intcall(0x22, &reg, &reg);
- pwdstr = MK_PTR(reg.es, reg.ebx.w[0]);
- if ((strlen(pwdstr) < size) && (buf != NULL)) {
- strcpy(buf, pwdstr);
- ret = buf;
- } else {
- ret = NULL;
- errno = ERANGE;
- }
- return ret;
+ return __com32.cs_pm->getcwd(buf, size);
}