stat buffer fields: add comments (unsigned) and '4 bytes' for non-qword values.

This commit is contained in:
2025-07-27 14:52:42 +02:00
parent 40583103a1
commit 310c199942
2 changed files with 19 additions and 19 deletions

View File

@@ -41,23 +41,23 @@ section .rodata
S_ISGID equ 0002000q ;set-group-ID bit S_ISGID equ 0002000q ;set-group-ID bit
S_ISUID equ 0004000q ;set-user-ID bit S_ISUID equ 0004000q ;set-user-ID bit
; Stat buffer fields ; Stat buffer fields
ST_DEV equ 0 ; Device ST_DEV equ 0 ; Device unsigned
ST_INO equ 8 ; File serial number ST_INO equ 8 ; File serial number unsigned
ST_NLINK equ 16 ST_NLINK equ 16 ; Number of links unsigned
ST_MODE equ 24 ; File mode ST_MODE equ 24 ; File mode unsigned, 4 bytes
ST_UID equ 28 ; User ID of the file's owner ST_UID equ 28 ; User ID of the file's owner unsigned, 4 bytes
ST_GID equ 32 ; Group ID of the file's group ST_GID equ 32 ; Group ID of the file's group unsigned, 4 bytes
ST__PAD0 equ 36 ST__PAD0 equ 36
ST_RDEV equ 40 ; Device number, if device ST_RDEV equ 40 ; Device number, if device unsigned
ST_SIZE equ 48 ; Size of file, in bytes ST_SIZE equ 48 ; Size of file, in bytes signed
ST_BLKSIZE equ 56 ; Optimal block size for I/O ST_BLKSIZE equ 56 ; Optimal block size for I/O signed
ST_BLOCKS equ 64 ; Number 512-byte blocks allocated ST_BLOCKS equ 64 ; Number 512-byte blocks allocated signed
ST_ATIME equ 72 ; Time of last access ST_ATIME equ 72 ; Time of last access unsigned
ST_ATIME_NSEC equ 80 ST_ATIME_NSEC equ 80 ; unsigned
ST_MTIME equ 88 ; Time of last modification ST_MTIME equ 88 ; Time of last modification unsigned
ST_MTIME_NSEC equ 96 ST_MTIME_NSEC equ 96 ; unsigned
ST_CTIME equ 104 ; Time of last status change ST_CTIME equ 104 ; Time of last status change unsigned
ST_CTIME_NSEC equ 112 ST_CTIME_NSEC equ 112 ; unsigned
ST__UNUSED equ 120 ST__UNUSED equ 120
ST__END equ 128 ; End of stat buffer ST__END equ 128 ; End of stat buffer
STATBUFF_SIZE equ ST__END STATBUFF_SIZE equ ST__END

View File

@@ -361,9 +361,9 @@ section .rodata
db "\tFile size: %d\n" db "\tFile size: %d\n"
db "\tBlock size: %d\n" db "\tBlock size: %d\n"
db "\tBlocks: %d\n" db "\tBlocks: %d\n"
db "\tatime: %d.%u\n" db "\tatime: %u.%u\n"
db "\tmtime: %d.%u\n" db "\tmtime: %u.%u\n"
db "\tctime: %d.%u\n",EOS db "\tctime: %u.%u\n",EOS
;fgettype() ;fgettype()
addTestHeader(_fgettype, "fgettype") addTestHeader(_fgettype, "fgettype")
addTest(fgettype1, "fgettype(statBuffer)") addTest(fgettype1, "fgettype(statBuffer)")