Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to know the sector size of a disk programmatically: (2 Items)
   
How to know the sector size of a disk programmatically  
Hi all,

I am a newbie in QNX. I am using QNX 6.5.0. I need to write a C++ program to find the sector size of a disk. I couldn't 
find any command/function for that. Please help me with a solution.

Thanks in advance,
Honey S
Re: How to know the sector size of a disk programmatically  
I had a similar requirement to determine the amount of RAM, Disk size, and video modes.  I wrote this test program to 
look for this information.  The first part walks the memory descriptor of SYSPAGE and adds up the total RAM.  Next I use
 statvfs64  to get the file system size.  The third section is what you are interested in.  It walks the hardware 
section of SYSPAGE looking specifically for filestore devices and printing info about them.  The last section is using 
the BIOS INT10H to interrogate the VESA information.
Attachment: Compressed file sysctl.zip 4.5 KB