Hi,
I was fooling around with the getdents() system call and came across
the following:
The d_off value in the dirent structure for the last entry in the directory list is
a large constant. For ext2 filesystems, this value equals the block size of my
filesytem (e2dump -s /dev/hdaxx), ie. 1024 in an RH5.2 install, and 4096 in an RH6.1
install. How do I access this value in a program I write (do I necessarily have to
access my superblock, or is there a simpler way)? I tried going through
/usr/src/linux/fs/ext2/dir.c for the readdir() function but I could'nt make head or
tail of it.
For an MSDOS formatted floppy (mounted either vfat or msdos), the last "dirent"
entry has 7168 (14*512) as the d_off value. What is its significance?
In a Minix floppy, there did not seem to be anything special to the d_off of the
last entry.
I need to be able to obtain this value(d_off) in a program without too many
complications, and before scanning through any directory structures. The program is
running as a kernel module (kern 2.2.13).
Thanks in advance,
--vml,
Model Engg. College, Cochin
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.