ioctl_fs(2)
ioctl_fs π
okay bestie, welcome to ioctl_fs(2) β the little corner of the System Calls Manual where the filesystem does its ~thing~. no cap, it's literally just "filesystem operations" and that's the whole NAME vibe β¨
πΈ LIBRARY
Standard C library (libc, -lc) π«Ά
β¨ SYNOPSIS
#include <linux/fs.h> /* Definition of op constants */
#include <sys/ioctl.h>
int ioctl(int fd, unsigned long op, ...);
so you pull in <linux/fs.h> for the op constants (the comment fr says "Definition of op constants" π), plus <sys/ioctl.h>, and then you're calling ioctl with your file descriptor fd, that unsigned long op, and the ... does whatever it wants, iykyk.
π¦ DESCRIPTION
The following op values are available. π
π Share some of the data of one file with another file
it's giving β¨sharing is caringβ¨ β you're passing around some of the data of one file to another file. iconic behavior honestly.
π Operations for inode flags
the inode flags girlies ~get~ and ~set~, main character energy π
π Get or set a filesystem label
naming your filesystem? slay. reading its name back? also slay. π
β Get and/or clear page flags
peeking at page flags and/or clearing them β multi-tasking queen π
π RETURN VALUE
On success, a nonnegative value is returned. π«Ά
On error, -1 is returned, and errno is set to indicate the error. (so like, always check errno, bestie, don't just rawdog the return value π)
π STANDARDS
Linux. that's it, that's the standard. periodt. π
π₯ SEE ALSO
okay that's the whole page, you ate it up fr fr π§β¨ this was Linux man-pages 6.20, dated 2025-05-17, and yes, ioctl_fs(2) really is the whole name up at the top. go forth and ioctl responsibly, my love π«Άππ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms