Polyfill statfs() and fstatfs() on Windows

This commit is contained in:
Justine Tunney 2022-08-17 18:57:03 -07:00
parent f7ee9d7d99
commit c2211c9e63
16 changed files with 370 additions and 50 deletions

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall sys_fstatfs,0x09f04022c215a08a,globl,hidden
.scall sys_fstatfs,0x09e04022c215a08a,globl,hidden

View file

@ -1155,7 +1155,7 @@ syscon ms MS_INVALIDATE 2 2 2 4 2 0
# statfs() flags
#
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon statfs ST_RDONLY 1 1 1 1 1 0 # MNT_RDONLY on BSD
syscon statfs ST_RDONLY 1 1 1 1 1 0x00080000 # MNT_RDONLY on BSD, kNtFileReadOnlyVolume on NT
syscon statfs ST_NOSUID 2 8 8 8 8 0 # MNT_NOSUID on BSD
syscon statfs ST_NODEV 4 16 0 16 16 0 # MNT_NODEV on BSD
syscon statfs ST_NOEXEC 8 4 4 4 4 0 # MNT_NOEXEC on BSD

View file

@ -169,7 +169,7 @@ scall mknodat 0x1cc14022fffff103 globl # FreeBSD 12+
scall sys_mkfifo 0x0840840842084fff globl hidden
scall mkfifoat 0x1cb13f1f1fffffff globl
scall sys_statfs 0x09d03f22b2159089 globl hidden
scall sys_fstatfs 0x09f04022c215a08a globl hidden
scall sys_fstatfs 0x09e04022c215a08a globl hidden
scall sys_getpriority 0x064064064206408c globl hidden
scall sys_setpriority 0x060060060206008d globl hidden # modern nice()
scall mlock 0x0cb0cb0cb20cb095 globl