lab9 Filesystem
  • Introduction
  • Important Commands
    • File Permissions
    • Disk Duplication
    • Create FAT Filesystems
    • Check and Repair FAT filesystem
    • Mount
    • Demo
    • Viewing with Hex Editor
      • Endian-ness in FAT32
  • Linux File System Calls
  • Directory Related Calls in C Language
  • Overview of FAT32
  • Accessing FAT using C
    • C Header of FAT
      • Header: Boot Sector
      • Header: Dir Entry
      • Read the header
    • 8+3 File Name
    • Traversing Cluster
    • Finding Next Cluster
    • Reference
Powered by GitBook
On this page

Was this helpful?

  1. Accessing FAT using C

C Header of FAT

In Linux, there is already predefined header for accessing the FAT32 system. Just include :

#include <linux/msdos_fs.h>

You can check the whole file in/usr/include/linux/folder. Inside this header, there is a predefined structure, called fat_boot_sector and msdos_dir_entry. This provides a simple way to get all the parameters

PreviousAccessing FAT using CNextHeader: Boot Sector

Last updated 5 years ago

Was this helpful?