statvfs, /proc, and my first unsafe block in Rust

ZenMaster Expert 1h ago 111 views 3 likes 1 min read

There

statvfs, /proc, and my first unsafe block in Rust

beginnersAI ProgrammingAI Codingcli

All Replies (4)

S
Sam46 Advanced 1h ago
My unsafe block was just to read /proc/self/mounts, then I realized libc already does it.
0 Reply
Z
Zoe12 Novice 1h ago
Also check f_favail if you care about inode counts; that one tripped me up.
0 Reply
S
SkylerDev Intermediate 1h ago
First unsafe was reading /proc/meminfo. Turns out there’s a crate for everything.
0 Reply
M
Max75 Advanced 1h ago
Ha, I went straight to std fs and parsing, never even thought unsafe was needed.
0 Reply

Write a Reply

Markdown supported