Displaying 1 result from an estimated 1 matches for "fatattr_to_st_mod".
Did you mean:
fatattr_to_st_mode
2009 Mar 01
0
[PATCH 1/3] COMBOOT API: Improve readdir
..._readdir:
mov si,P_SI
call readdir
mov P_EAX,eax
- mov P_DL,dl
+ mov P_DX,dx
mov P_EBX,ebx
mov P_SI,si
ret
diff --git a/core/ldlinux.asm b/core/ldlinux.asm
index a24f396..bb5bf14 100644
--- a/core/ldlinux.asm
+++ b/core/ldlinux.asm
@@ -1377,6 +1377,40 @@ searchdir:
ret
;
+; fatattr_to_st_mode: Translate a FAT attribute to struct stat st_mode.
+;
+; DL FAT Attribute
+;
+; Returns st_mode
+; DX st_mode
+;
+
+fatattr_to_st_mode:
+ push eax
+ test dl,0xC8 ; 0x80 Unknown 0x40 Device(Internal)
+ ; 0x08 Label
+ jnz .zero
+ mov ax,0444o
+ test dl,1 ; 1 ReadOnly
+ jnz .is_ro
+ add ax,...