NAME

lkmi_filesys


SYNOPSIS

#include <lkmi.h >

int lkmi_filesysinfo (lkmi_filesysdescr_t *fsinfo, int index, int num);


PARAMETERS

fsinfo
Pointer to array which contain num of lkmi_filesysdescr_t. If the pointer is NULL then number of mounted filesystems is returned.

index
Index of first evaluated filesystems. First index is 0.

num
Number of lkmi_filesysdescr_t blocks in fsinfo array.

EXAMPLE If list of mounted filesystems contain these fs /, /home and /var and index is set to 1 and num is set to 2 then array fsinfo is filled with infos about /home and /var.


DESCRIPTION

Function retrieves information about mounted disks (including virtual) and fills array fsinfo which contains these fields.

NOTE: The list of mounted directories is readed from /etc/mtab.

device
Name of device which contains a filesystem.

mountpt
Mount point of this filesystem.

fsdata
Structure struct statfs which contains filesystem's data.


RETURN VALUE

If parameter fsinfo is NULL then number of mounted filesystems, which are recorded in /etc/mtab, is returned.

If parameter fsinfo is not NULL pointer then 0 is returned if function succeeded. If not then -1 is returned and errno is set to appropriate value.

If some filesystem has unreadeble info then the devname and mountpt are set to the empty strings.

ENOENT
Filesystem index is out of range. And not all array elements has useful data.

other
See fopen(3) function, which causes other errors.


BUGS REPORTING

Please use the SourceForge Reporting page which is located here:

Bug Report


COPYRIGHT

This function is written as part of lkmi library for Linux system and may be freely distributed under GPL terms.

Copyright (c) 1995, 2002 David Doubrava (linux_monitor(at)volny(dot)cz).


SEE ALSO

statfs(2) function

Origin of values description is in Linux kernel source.

lkmi, lkmi_cpu, lkmi_files, lkmi_filesys, lkmi_hdd, lkmi_hw_intr, lkmi_inodes, lkmi_memory, lkmi_memoryswap, lkmi_net, lkmi_proc, lkmi_readprocesses, lkmi_swap, lkmi_swapex, lkmi_system