DragonFly On-Line Manual Pages

Search: Section:  

LIBFSID(3)            DragonFly Library Functions Manual            LIBFSID(3)


fsid_probe, fsid_probe_all, fsid_volname, fsid_volname_all, fsid_fsname, fsid_fs_count -- general libfsid functions


Filesystem Identification Library (libfsid, -lfsid)


#include <libfsid.h> fsid_t fsid_probe(const char *dev, const char *fs_name); fsid_t fsid_probe_all(const char *dev); char * fsid_volname(const char *dev, const char *fs_name); char * fsid_volname_all(const char *dev); const char * fsid_fsname(fsid_t id); int fsid_fs_count(void);


The Filesystem Identification Library (libfsid, -lfsid) provides an interface to determine several filesystems and to get their volume labels. Most functions use the parameter dev for specifying the full path of the device and some of them have an additional fs_name parameter which is the name of the chosen filesystem. It can be: HAMMER A HAMMER(5) filesystem UFS A UFS(5) filesystem CD9660 An ISO 9660 filesystem EXT2 Linux' second extended filesystem MSDOSFS An msdos(5) filesystem The fsid_probe() function returns one of FSID_CD9660, FSID_EXT2, FSID_HAMMER or FSID_UFS if the device has the filesystem type as expected by the fs_name parameter, otherwise FSID_UNKNOWN. The fsid_probe_all() function tries to identify the filesystem type. It returns FSID_UNKNOWN if the filesystem is unknown, or the check fails. Otherwise the returned value is one of: FSID_HAMMER A HAMMER(5) filesystem FSID_UFS A UFS(5) filesystem FSID_CD9660 An ISO 9660 filesystem FSID_EXT2 Linux' second extended filesystem FSID_MSDOSFS An msdos(5) filesystem The name of the filesystem can be easily queried with the fsid_fsname() function. The fsid_volname() function returns the volume label, if the filesystem name is the same as specified by fs_name. If not, it returns NULL. The fsid_volname_all() function returns the volume label, if the filesystem is known. Otherwise it returns NULL. The fsid_fsname() function returns the name of the filesystem as a pointer to string. The id is usually the return value of a fsid_probe_all() call. The fsid_fs_count() function returns the number of supported filesystems.




The library and the manual page were written by Akos Kovacs <akoskovacs@gmx.com>. DragonFly 5.5 December 12, 2010 DragonFly 5.5

Search: Section: