searchdir:
push bx
push cx
- push di
push bp
mov byte [SymlinkCtr],MAX_SYMLINKS
.done:
and eax,eax ; Set/clear ZF
pop bp
- pop di
pop cx
pop bx
ret
; to the above, searchdir_iso passes a file flag mask in AL. This is useful
; for searching for directories.
;
-alloc_failure:
+searchdir_iso.alloc_failure:
xor ax,ax ; ZF <- 1
- ret
+ jmp searchdir_iso.ret
searchdir:
xor al,al
searchdir_iso:
+ push bx
+ push cx
mov [ISOFlags],al
TRACER 'S'
call allocate_file ; Temporary file structure for directory
- jnz alloc_failure
+ jnz .alloc_failure
push es
push ds
pop es ; ES = DS
.failure: xor eax,eax ; ZF = 1
mov [bx+file_sector],eax
- pop es
- ret
+ jmp .ret
.success:
mov eax,[si+2] ; Location of extent
shr edx,16
and bx,bx ; ZF = 0
mov si,bx
+.ret:
pop es
+ pop cx
+ pop bx
ret
.resume: ; We get here if we were only doing part of a lookup
;
searchdir:
+ push bx
call allocate_file
jnz .alloc_failure
+ push cx
push gs
push es
push ds
.failure:
pop es
pop gs
+ pop cx
.alloc_failure:
- xor ax,ax ; ZF <- 1
+ pop bx
+ xor eax,eax ; ZF <- 1
ret
.found:
mov eax,[gs:si+28] ; File size
pop es
pop gs
+ pop cx
+ pop bx
ret
;
searchdir:
push es
+ push bx
+ push cx
mov ax,ds
mov es,ax
mov si,di
mov bp,sp
call allocate_socket
- jz .error
+ jz .ret
mov ax,PKT_RETRY ; Retry counter
mov word [PktTimeout],PKT_TIMEOUT ; Initial timeout
pop bp ; Junk
pop bp ; Junk (retry counter)
jz .error_si ; ZF = 1 need to free the socket
+.ret:
pop bp
+ pop cx
+ pop bx
pop es
ret
.error: mov si,bx ; Socket pointer
.error_si: ; Socket pointer already in SI
call free_socket ; ZF <- 1, SI <- 0
- pop bp
- pop es
- ret
+ jmp .ret
;
; allocate_socket: Allocate a local UDP port structure