Mail Archives: djgpp/1994/05/25/15:47:20
> When writing a file to disk, are all 4096 bytes of a "transfer block"
> always in 8 contiguous "disk blocks"? If so, then I have no problem
> with st_blksize getting set to 4096.
Irrelevent, since we always go through the DOS filesystem calls.
Nothing in a djgpp application needs to worry about the physical
layout of a file on disk.
> I don't recall, and I'm at work now. Is there an st_blocks field in
> the stat structure? If so, I think it should be equal to the number
> of st_blksize blocks in the file.
There is an st_size member, but it is in bytes, not blocks.
<sys/vfs.h> has a statfs structure that returns physical blocksize and
number of physical blocks on each drive.
- Raw text -