Final Year Project: Using Linux Filesystems Under Windows   Chris Bryden BEng. Electronics and Software Engineering    School of Computer Science   University of Birmingham 72 20.3  Implementing the ext2_mount_fs Function MOUNTINFO FAR PASCAL   ext2_mount_fs(unsigned short bDrive, unsigned short bPart); This function accepts two arguments, the hard disk number and partition number  of  the  partition  containing  the  filesystem  to  mount.  These  are  in  the same format as displayed by the get_part_info function, above.   This  function  returns  a  small  structure  of  the  type  MOUNTINFO.  This contains some information that the calling application may wish to display to the user: The elements of this structure hold the following values: · =ulInodes - The total number of inodes in the filesystem · =ulBlocks - The total number of blocks in the filesystem · =ulFreeInodes - The number of free inodes in the filesystem. · =ulFreeBlocks - The number of free blocks in the filesystem. · =ulBlockSize - The block size in bytes. void DisplayPartitonInformation(void) { PARTINFO PartInfo; PARTITION Partition; unsigned i; PartInfo = get_part_info(); for(i=0;i<=(PartInfo.uParts-1);++i) { _fmemcpy(&Partition, PartInfo.lpPartTbl + i, sizeof(PARTITION)); if(Partition.ulSize != 0) { /* CODE TO DISPLAY ENTRIES GOES HERE */ } } return; } typedef struct mountinfo { unsigned long ulInodes; unsigned long ulBlocks; unsigned long ulFreeInodes; unsigned long ulFreeBlocks; unsigned long ulBlockSize; char sMountTime[26]; unsigned short usState; } MOUNTINFO;