Add (basic) tests for stat(), fgettype(), fgetmod()
This commit is contained in:
@@ -20,10 +20,10 @@ section .text
|
||||
; Used registers:
|
||||
; rax* (ret)
|
||||
; rdi* (arg) Pointer to file
|
||||
; rsi* (arg) Pointer to statBuffer
|
||||
; rsi* arg for syscall NR_newfstatat
|
||||
; rdx* arg for syscall NR_newfstatat
|
||||
; r10* arg(flag) for syscall NR_newfstatat
|
||||
fstatat:
|
||||
stat:
|
||||
sub rsp, SIZE_QWORD
|
||||
mov rax, NR_newfstatat
|
||||
mov rdx, rsi
|
||||
@@ -46,7 +46,7 @@ fgettype:
|
||||
mov rax, -EINVAL
|
||||
ret
|
||||
.buffok:
|
||||
mov eax, dword [rdi + ST_MODE]
|
||||
mov eax, [rdi + ST_MODE]
|
||||
and eax, 0xF000
|
||||
ret
|
||||
|
||||
|
Reference in New Issue
Block a user