aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-03-04 22:54:07 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-03-04 22:54:07 -0800
commitb4da45a8a0a7c7e6f66850dee1f1733100767c30 (patch)
tree9c7113f863d116123b33627e4351e642410ebb22 /com32/include
parent62f4043881ed61fae8ea899c59797a1cc8e1c651 (diff)
downloadsyslinux-b4da45a8a0a7c7e6f66850dee1f1733100767c30.tar.gz
syslinux-b4da45a8a0a7c7e6f66850dee1f1733100767c30.tar.xz
syslinux-b4da45a8a0a7c7e6f66850dee1f1733100767c30.zip
readdir: replace opendir/readdir/closedir API with a 32-bit API
The 16-bit API to opendir/readdir/closedir was confused, had a memory leak, and was incompatible with Syslinux 3.x anyway. Replace it with a pure 32-bit API. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include')
-rw-r--r--com32/include/sys/dirent.h7
-rw-r--r--com32/include/syslinux/pmapi.h7
2 files changed, 9 insertions, 5 deletions
diff --git a/com32/include/sys/dirent.h b/com32/include/sys/dirent.h
index cc2916e1..a7f26e45 100644
--- a/com32/include/sys/dirent.h
+++ b/com32/include/sys/dirent.h
@@ -19,11 +19,8 @@ struct dirent {
char d_name[NAME_MAX + 1];
};
-struct file;
-
-typedef struct {
- struct file *dd_dir;
-} DIR;
+struct _DIR_;
+typedef struct _DIR_ DIR;
#define DIR_REC_LEN(name) (12 + strlen(name) + 1 + 3) & ~3
diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h
index d16d3de1..34648e52 100644
--- a/com32/include/syslinux/pmapi.h
+++ b/com32/include/syslinux/pmapi.h
@@ -42,11 +42,18 @@
* Note: add new members to this structure only at the end.
* The position of elements in this structure is an ABI.
*/
+struct _DIR_;
+struct dirent;
+
struct com32_pmapi {
void *(*lmalloc)(size_t);
void (*lfree)(void *);
size_t (*read_file)(uint16_t *, void *, size_t);
+
+ struct _DIR_ *(*opendir)(const char *);
+ struct dirent *(*readdir)(struct _DIR_ *);
+ int (*closedir)(struct _DIR_ *);
};
#endif /* _SYSLINUX_PMAPI_H */