diff options
author | Gene Cumm <gene.cumm@gmail.com> | 2009-02-08 09:36:59 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-09 22:49:17 -0800 |
commit | c1def425e3eeb245da7a59025f2fa37f02368504 (patch) | |
tree | ad741a1bfc81828eb474b77b7c9ec270355c6bc3 /core/isolinux.asm | |
parent | 2b02abdaa91f41235f40f846d08bb09d8841baa6 (diff) | |
download | syslinux-c1def425e3eeb245da7a59025f2fa37f02368504.tar.gz |
COMBOOT API: Add calls for directory functions; Implement for FAT
COMBOOT API: Add calls for directory functions; Implement most only
for FAT (SYSLINUX).
Uses INT 22h AX= 001Fh, 0020h, 0021h and 0022h to prepare for the
COM32 C functions getcwd(), opendir(), readdir(), and closedir(),
respectively. INT22h, AX=001Fh will return a valid value for all
variants. INT22h, AX= 0020h, 0021h, and 0022h are only implemented
for SYSLINUX while other variants will call comapi_err for these 3.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/isolinux.asm')
-rw-r--r-- | core/isolinux.asm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm index 3b970053..2c6d9702 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -36,6 +36,8 @@ MAX_OPEN equ (1 << MAX_OPEN_LG2) SECTOR_SHIFT equ 11 ; 2048 bytes/sector (El Torito requirement) SECTOR_SIZE equ (1 << SECTOR_SHIFT) +ROOT_DIR_WORD equ 0x002F + ; ; This is what we need to do when idle ; @@ -1147,15 +1149,33 @@ get_fs_structures: ; Look for an isolinux directory, and if found, ; make it the current directory instead of the root ; directory. + ; Also copy the name of the directory to CurrentDirName + mov word [CurrentDirName],ROOT_DIR_WORD ; Write '/',0 to the CurrentDirName mov di,boot_dir ; Search for /boot/isolinux mov al,02h + push di call searchdir_iso + pop di jnz .found_dir mov di,isolinux_dir mov al,02h ; Search for /isolinux + push di call searchdir_iso + pop di jz .no_isolinux_dir .found_dir: + ; Copy current directory name to CurrentDirName + push si + push di + mov si,di + mov di,CurrentDirName + call strcpy + mov byte [di],0 ;done in case it's not word aligned + dec di + mov byte [di],'/' + pop di + pop si + mov [CurrentDir+dir_len],eax mov eax,[si+file_left] mov [CurrentDir+dir_clust],eax |