Thread #108548206
File: 1760304060962246.gif (722.5 KB)
722.5 KB GIF
previous: >>108539586#define __NR_ustat 136
#define __NR_statfs 137
#define __NR_fstatfs 138
https://man7.org/linux/man-pages/man2/ustat.2.html
https://man7.org/linux/man-pages/man2/statfs.2.html
tl;dr:
get filesystem statistics
holy fucking magic numbers batman... just look at that list
also
>Nobody knows what f_fsid is supposed to contain (but see below).
i mean this is just comical? how is linux even real?
then there's also
>The __fsword_t type used for various fields in the statfs structure definition is a glibc internal type, not intended for public use.
>This leaves the programmer in a bit of a conundrum when trying to copy or compare these fields to local variables in a program.
>Using unsigned int for such variables suffices on most systems.
genuinely how does any OS function if this is the level of nonsense we're facing?
relevant resources:man manman syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
21 RepliesView Thread
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>108549977
glibc is providing the wrappers though.
Also, if you value not having nightmares, do NOT look into AIO. You hear me? NO AIO!
>>108550157
glibc provides userspace implementations of all sorts of shit. Mind you, *userspace*.
>>108550735
This.
>>
File: Screenshot From 2026-03-30 18-17-38.png (111.1 KB)
111.1 KB PNG
>>108550858
>>108550735
Appreciated. This is very interesting.
>>
>>108548875
now this is the kind of energy i need in my life
>>108548524
glad you're enjoying them, anon
>>108550735
>*not guaranteed :^)
lol
>>
>>108550164
No. Look at the "standards" or "history" section of the manpages, stuff that's C- or POSIX-compatible is marked as such. A simple example would by memchr(3), listing memchr as part of the POSIX and C standards, and memrchr() and rawmemchr() as glibc extensions.
>>
>>108548206
from the manpage:Subsequently, Linux 2.6 added new statfs64() and fstatfs64() system
calls that employ a new structure, statfs64. The new structure contains the same fields as the original statfs structure, but the sizes of various fields are increased, to accommodate
large file sizes. The glibc statfs() and fstatfs() wrapper functions transparently deal with the kernel differences.
this might explain the retarded __fsword_t type. They tried to be "helpful" by abstracting over 32/64 bit architectures but half assed it
>>
>>
>>