diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-02-25 15:25:16 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-02-26 11:29:04 +0000 |
commit | 76da2ae050d72a31fd47c2fb53f7081781de62ff (patch) | |
tree | 6da146b5f19ca17ff24d4e74940f14264d38f914 /core/fs/fs.c | |
parent | 41c29c26d70fde563d7c255872bbadad87a39dfa (diff) | |
parent | 79312306de0150ef64213ef9fbc5aa8580544f03 (diff) | |
download | syslinux-76da2ae050d72a31fd47c2fb53f7081781de62ff.tar.gz |
Merge branch 'lwip' into elflink
Welcome to Syslinux 5.10.
Conflicts:
NEWS
com32/lib/Makefile
com32/lib/sys/open.c
com32/lib/syslinux/ipappend.c
com32/modules/Makefile
com32/modules/prdhcp.c
core/Makefile
core/cmdline.inc
core/com32.inc
core/comboot.inc
core/configinit.inc
core/fs/chdir.c
core/fs/fs.c
core/fs/pxe/dnsresolv.c
core/fs/pxe/pxe.c
core/fs/pxe/pxe.h
core/idle.c
core/include/ctype.h
core/init.inc
core/mem/init.c
core/parseconfig.inc
core/runkernel.inc
core/syslinux.ld
core/ui.inc
doc/comboot.txt
version
Diffstat (limited to 'core/fs/fs.c')
-rw-r--r-- | core/fs/fs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/fs/fs.c b/core/fs/fs.c index 2c10fe95..1cb4b00a 100644 --- a/core/fs/fs.c +++ b/core/fs/fs.c @@ -3,6 +3,7 @@ #include <stdbool.h> #include <string.h> #include <unistd.h> +#include <fcntl.h> #include <dprintf.h> #include "core.h" #include "dev.h" @@ -138,7 +139,7 @@ size_t pmapi_read_file(uint16_t *handle, void *buf, size_t sectors) return bytes_read; } -int searchdir(const char *name) +int searchdir(const char *name, int flags) { static char root_name[] = "/"; struct file *file; @@ -155,7 +156,7 @@ int searchdir(const char *name) /* if we have ->searchdir method, call it */ if (file->fs->fs_ops->searchdir) { - file->fs->fs_ops->searchdir(name, file); + file->fs->fs_ops->searchdir(name, flags, file); if (file->inode) return file_to_handle(file); @@ -336,7 +337,7 @@ err_no_close: return -1; } -__export int open_file(const char *name, struct com32_filedata *filedata) +__export int open_file(const char *name, int flags, struct com32_filedata *filedata) { int rv; struct file *file; @@ -345,7 +346,7 @@ __export int open_file(const char *name, struct com32_filedata *filedata) dprintf("open_file %s\n", name); mangle_name(mangled_name, name); - rv = searchdir(mangled_name); + rv = searchdir(mangled_name, flags); if (rv < 0) return rv; @@ -399,9 +400,6 @@ void fs_init(com32sys_t *regs) /* ops is a ptr list for several fs_ops */ const struct fs_ops **ops = (const struct fs_ops **)regs->eax.l; - /* Initialize malloc() */ - mem_init(); - /* Default name for the root directory */ fs.cwd_name[0] = '/'; |