c - How can I get which blocks a file uses that is located inside a virtual file system I created? -


how can blocks file uses located inside virtual file system created in linux?

i'm trying read disk in raw mode , find out blocks allocated given file, inside c program.

i suppose need parse fat table i'm not sure how proceed. ideas?

any appreciated.

this how created virtual file system:

sudo su dd if=/dev/zero of=disk.img bs=1k count=100000 losetup /dev/loop0 disk.img mkdosfs -s 1 -f 32 /dev/loop0 100000 mkdir /mnt/mydisk mount -o loop -t vfat /home/a/os/p5/disk.img /mnt/mydisk cd /mnt/mydisk -do staff, add files , directories 

it's looks sort of student assignment. find nice description of fat32 here.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -