diff options
author | H. Peter Anvin <hpa@zytor.com> | 2011-05-01 18:11:40 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-05-01 18:11:40 -0700 |
commit | 6ed325a3c881565cc2473d1fbfa69d806b4b7bbf (patch) | |
tree | fccf7b5c5035386928dec4d08e9008c2a9b672b8 /core/fs/pxe/pxe.c | |
parent | 1b30df94470464ac17c75b07d5062e03af1ef68a (diff) | |
download | syslinux-6ed325a3c881565cc2473d1fbfa69d806b4b7bbf.tar.gz |
core: pass the file flags down through the stack
Pass the file flags down through the stack. This allows us to
distinguish between open for read, open for write, or opendir in the
low-level filesystem functions; this will matter for the PXE methods.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/pxe/pxe.c')
-rw-r--r-- | core/fs/pxe/pxe.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 3242a9f5..b7ec0506 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -295,20 +295,20 @@ static void url_set_ip(struct url_info *url) * @out: the lenght of this file, stores in file->file_len * */ -static void __pxe_searchdir(const char *filename, struct file *file); +static void __pxe_searchdir(const char *filename, int flags, struct file *file); extern uint16_t PXERetry; -static void pxe_searchdir(const char *filename, struct file *file) +static void pxe_searchdir(const char *filename, int flags, struct file *file) { int i = PXERetry; do { dprintf("PXE: file = %p, retries left = %d: ", file, i); - __pxe_searchdir(filename, file); + __pxe_searchdir(filename, flags, file); dprintf("%s\n", file->inode ? "ok" : "failed"); } while (!file->inode && i--); } -static void __pxe_searchdir(const char *filename, struct file *file) +static void __pxe_searchdir(const char *filename, int flags, struct file *file) { struct fs_info *fs = file->fs; struct inode *inode; @@ -321,6 +321,8 @@ static void __pxe_searchdir(const char *filename, struct file *file) int redirect_count = 0; bool found_scheme = false; + (void)flags; + inode = file->inode = NULL; while (filename) { |