ioctl_fat(2)

πŸ’… ioctl_fat β€” the manipulating the FAT filesystem era

okay bestie, so this one lives in the System Calls Manual, section 2 β€” it's ioctl_fat(2), and no cap it's the girl that lets you poke at FAT filesystem metadata you literally cannot reach any other way. πŸ“

✨ NAME ✨

ioctl_fat β€” manipulating the FAT filesystem πŸ’Ύ

πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc) β€” she's built right in, you don't gotta install anything.

🫢 SYNOPSIS 🫢

#include <sys/ioctl.h>

int ioctl(int fd, unsigned long op, ...);

🌸 DESCRIPTION 🌸

so the ioctl(2) system call is the main character here, and the way that it works is: you can use it to read and write metadata of FAT filesystems that are genuinely not accessible using other system calls. like, those other syscalls simply cannot, they're not invited. πŸ™ˆ

The following op values are available, and yes we're listing all of them, no skipping:

πŸŽ€ Reading and setting file attributes πŸŽ€

πŸ”₯ Reading the volume ID πŸ”₯

πŸ¦‹ Reading short filenames of a directory πŸ¦‹


⭐ RETURN VALUE ⭐

  • On success, a nonnegative value is returned. slay. ✨
  • On error, -1 is returned, and errno is set to indicate the error. she'll tell you what went wrong, just read the receipt.

πŸ’€ ERRORS πŸ’€

  • ENOTTY β€” the file descriptor fd does not refer to an object in a FAT filesystem. it's giving "wrong girl, wrong filesystem" 😭

πŸ‘‘ STANDARDS πŸ‘‘

Linux. periodt. πŸ’…

🧚 SEE ALSO 🧚


okay that's the whole page bestie, you ate, go read some FAT metadata responsibly πŸ’œ

this was ioctl_fat(2) from Linux man-pages 6.20, dated 2025-05-17 β€” mwah, sending you the biggest hug, bye pookie 🫢✨

πŸ“¦ 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