summaryrefslogtreecommitdiff
path: root/core/fs
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2010-06-26 22:51:39 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-06-26 20:52:58 -0700
commit03791432c7207da9eb6c898bf15f003ab92ff10e (patch)
treedf8633fd7d4d2ac1014e9f17caf60d4a6b68019b /core/fs
parent2d3c94d753dc27040c4ea93550429e231a205181 (diff)
downloadsyslinux-03791432c7207da9eb6c898bf15f003ab92ff10e.tar.gz
PM getcwd(); Fix COM32 getcwd
Implement getcwd() in the core; Fix COM32 getcwd() to use the new function. This resolves the previous comment about COM32 getcwd() not working by not using INT 22h AX=001Fh. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs')
-rw-r--r--core/fs/getcwd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/fs/getcwd.c b/core/fs/getcwd.c
new file mode 100644
index 00000000..a7b6c7a9
--- /dev/null
+++ b/core/fs/getcwd.c
@@ -0,0 +1,13 @@
+#include <string.h>
+#include "fs.h"
+
+char *getcwd(char *buf, size_t size)
+{
+ char *ret = NULL;
+
+ if((buf != NULL) && (strlen(this_fs->cwd_name) < size)) {
+ strcpy(buf, this_fs->cwd_name);
+ ret = buf;
+ }
+ return ret;
+}