---
name: "ioctl_fat"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ioctl_fat"
---

# ioctl\_fat(2)

manipulating the FAT filesystem

## NAME

ioctl\_fat - manipulating the FAT filesystem

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/ioctl.h>
```

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

## DESCRIPTION

The [**ioctl**(2)](/ioctl/2.md) system call can be used to read and write metadata of FAT filesystems that are not accessible using other system calls. The following *op* values are available.

### Reading and setting file attributes

- [**FAT\_IOCTL\_GET\_ATTRIBUTES**(2const)](/FAT_IOCTL_GET_ATTRIBUTES/2const.md) [**FAT\_IOCTL\_SET\_ATTRIBUTES**(2const)](/FAT_IOCTL_SET_ATTRIBUTES/2const.md)

  ### Reading the volume ID

- [**FAT\_IOCTL\_GET\_VOLUME\_ID**(2const)](/FAT_IOCTL_GET_VOLUME_ID/2const.md)

  ### Reading short filenames of a directory

- [**VFAT\_IOCTL\_READDIR\_BOTH**(2const)](/VFAT_IOCTL_READDIR_BOTH/2const.md) [**VFAT\_IOCTL\_READDIR\_SHORT**(2const)](/VFAT_IOCTL_READDIR_SHORT/2const.md)

  ## RETURN VALUE

On success, a nonnegative value is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **ENOTTY**

  The file descriptor *fd* does not refer to an object in a FAT filesystem.

## STANDARDS

Linux.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md)
