int get_resources(struct resources *res,ERR_PARAM)
takes pointer to the allocated structure
struct resources and
fills it in with information about hard disks in the computer and
their partition structure. The function processes in several steps:
exist. The detection of presence of drives is done by calling function
int try_device(char *devicename). This function returns one if the device named
devicenameis present in the computer and zero otherwise.
rs_diskcountis filled and memory for
int fill_disk(char *devicename,struct disk_info *diskinfo,struct fs_pars *filesystems,ERR_PARAM)is called to obtain information about all detected drives.
ud_part) of disks, partitions and directories are filled.
int fill_disk(char *devicename,struct disk_info *diskinfo,struct fs_pars *filesystems,ERR_PARAM) obtains information about
partition structure on device named
devicename and fills in
diskinfo using filesystem parameters stored
filesystem. The function processes in several steps:
devicenameis detected and filled in structure
read_partitionof Partitioner module is called. This function fills in structure
diskinfoinformation about partition structure of the device.
fc_identifyis called for each found partition on the device and for all known filesystems. If any of filesystems is detected, its function
fc_getparamsis called and this function fills in the filesystem parameters. If any of the filesystem is successfully detected the detection process is aborted and the functions
fc_identifyof other filesystems are not called. The filesystems are detected in decreasing order as they are stored in array
regfs. The last filesystem (
regfs) should be `unknown filesystem' which detection is always positive.