|author||H. Peter Anvin <firstname.lastname@example.org>||2010-03-04 22:54:07 -0800|
|committer||H. Peter Anvin <email@example.com>||2010-03-04 22:54:07 -0800|
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 <firstname.lastname@example.org>
Diffstat (limited to 'doc')
1 files changed, 23 insertions, 37 deletions
diff --git a/doc/comboot.txt b/doc/comboot.txt
index b6c947a2..b970b281 100644
@@ -869,44 +869,16 @@ AX=001Fh [3.74] Get current working directory
Input: AX 0001Fh
Output: ES:BX null-terminated directory name string
- Returns the current working directory. For SYSLINUX, ISOLINUX,
- and PXELINUX, this will be an absolute path. For EXTLINUX, it
- currently returns "./".
+ Returns the current working directory.
-AX=0020h [3.74] Open directory
- Input: AX 0020h
- ES:SI /-null-terminated directory name
- Output: SI directory handle
- EAX clobbered
+AX=0020h [3.74] Obsoleted in 4.00
+AX=0021h [3.74] Obsoleted in 4.00
+AX=0022h [3.74] Obsoleted in 4.00
- Open a directory for reading. Directory name must have a trailing
- "/" before the null (otherwise, you're looking for a file)(This
- may change as this is a BETA call).
-AX=0021h [3.74] Read directory
- Input: AX 0021h
- SI directory handle
- ES:DI buffer for file name
- Output: DL Type of file
- SI directory handle, or 0 if end of directory was reached
- EAX Size of file
- EBX Inode of file
- Read one filename from the directory, incrementing the
- directory structure at SI as appropriate, storing the filename
- into the buffer at ES:DI, and returning the type of the file
- in DL, the file length in EAX, the inode/file number in EBX
- and the updated directory handle.
-AX=0022h [3.74] Close directory
- Input: AX 0022h
- SI directory handle
- Output SI 0
- Closes a directory.
+ These three functions provided opendir/readdir/closedir
+ functionality in the late 3.xx series. They have been
+ replaced by the protected-mode interface.
AX=0023h [3.80] Get shuffler parameters
@@ -983,13 +955,27 @@ AX=0024h [3.80] Cleanup, shuffle and boot, raw version
++++ 32-BIT ONLY API CALLS ++++
+void *pm_cs->lmalloc(size_t bytes)
Allocate a buffer in low memory (below 1 MB).
-void pm_cs->lfree(void *)
+void pm_cs->lfree(void *ptr)
Free a buffer allocated with pm_cs->lmalloc().
+DIR *pm_cs->opendir(const char *pathname)
+ Open a directory.
+struct dirent *pm_cs->readdir(DIR *dir)
+ Read an entry from a directory. The entry is returned in a
+ static buffer.
+int pm_cs->closedir(DIR *dir)
+ Close a directory.