[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1760304060962246.gif (722 KB, 416x498)
722 KB
722 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 man

man 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/
>>
>>108548206
bussy status?
>>
>>108548206
>genuinely how does any OS function if this is the level of nonsense we're facing?
With duct tape and bubble gum.
>>
>>108548206
>how does any OS function if this is the level of nonsense we're facing
Hardware engineers doing a LOT of heavy lifting.
>>
>>108548206
i don't even know what a syscall is but i fucking love these threads
>>
deprecated
>>
i want syscall anon PREGNANT by tomorrow
>>
Imagine getting impregnated by your big dick futa gf that would be weird haha
>>
>genuinely how does any OS function if this is the level of nonsense we're facing?
at this point just use the raw syscall instead of dealing with glibc
>>
as I understand it glibc is the universal C library with all the tooling and instrumentation that keeps compatibility between different machines.
>>
I have a question, glibc makes the C software you write "POSIX compatible" so can run over every POSIX compliant infrastructure?

Is this correct?
>>
>>108550164
no, glibc makes your software glibc compatible* *not guaranteed :^)
>>
>>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.
>>
>>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.
>>
bampu
>>
>>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
>>
>>108550735
why is it like this
>>
>>108548329
Hardware is magic as far as I'm concerned.
God personally intervenes in every CPU cycle to ensure that instructions are executed as intended.
>>
>>108558665
honestly this really doesn't feel far off from the truth lol
>>
>>108558665
Aliens gave us two's complement.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.