[syslinux:pathbased] fs: add no_next_extent() dummy function
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sun Feb 28 21:57:23 PST 2010
Commit-ID: eb7a9ee9c66d11a0c5cb5bfc363a2c82e015d2b0
Gitweb: http://syslinux.zytor.com/commit/eb7a9ee9c66d11a0c5cb5bfc363a2c82e015d2b0
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 28 Feb 2010 21:55:59 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 28 Feb 2010 21:55:59 -0800
fs: add no_next_extent() dummy function
Add a no_next_extent() dummy function for filesystems (like iso9660)
which should never end up calling next_extent (because there is only
one extent...)
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/fs/iso9660/iso9660.c | 3 ++-
core/fs/nonextextent.c | 13 +++++++++++++
core/include/fs.h | 3 +++
3 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/core/fs/iso9660/iso9660.c b/core/fs/iso9660/iso9660.c
index aa1ca16..2362293 100644
--- a/core/fs/iso9660/iso9660.c
+++ b/core/fs/iso9660/iso9660.c
@@ -359,5 +359,6 @@ const struct fs_ops iso_fs_ops = {
.load_config = iso_load_config,
.iget_root = iso_iget_root,
.iget = iso_iget,
- .readdir = iso_readdir
+ .readdir = iso_readdir,
+ .next_extent = no_next_extent,
};
diff --git a/core/fs/nonextextent.c b/core/fs/nonextextent.c
new file mode 100644
index 0000000..0c1ce2c
--- /dev/null
+++ b/core/fs/nonextextent.c
@@ -0,0 +1,13 @@
+#include "fs.h"
+
+/*
+ * Use this routine for the next_extent() pointer when we never should
+ * be calling next_extent(), e.g. iso9660.
+ */
+int no_next_extent(struct inode *inode, uint32_t lstart)
+{
+ (void)inode;
+ (void)lstart;
+
+ return -1;
+}
diff --git a/core/include/fs.h b/core/include/fs.h
index 4aca7fc..c210288 100644
--- a/core/include/fs.h
+++ b/core/include/fs.h
@@ -227,4 +227,7 @@ void generic_close_file(struct file *file);
uint32_t generic_getfssec(struct file *file, char *buf,
int sectors, bool *have_more);
+/* nonextextent.c */
+int no_next_extent(struct inode *, uint32_t);
+
#endif /* FS_H */
More information about the Syslinux-commits
mailing list