libblkid - a library to handle device identification and token extraction

Basic usage is as follows - there are two normal usage patterns:

For cases where a program wants information about multiple devices, or
expects to be doing multiple token searches, the program should
directly initialize cache file via (second parameter is cache
filename, NULL = default):

	blkid_cache cache = NULL;
	if (blkid_get_cache(&cache, NULL) < 0)
		/* error reading the cache file, not really fatal */

Note that if no cache file exists, an empty cache struct is still
allocated.  Usage of libblkid functions will use the cache to avoid
needless device scans.

The model of the blkid cache is that each device has a number of
attributes that can be associated with it.  Currently the attributes
which are supported (and set) by blkid are:

	TYPE		filesystem type
	UUID		filesystem uuid
	LABEL		filesystem label


How to use libblkid?  Normally, you either want to find a device with
a specific NAME=value token, or you want to output token(s) from a
device.  To find a device that matches a following attribute, you
simply call the blkid_get_devname() function:

	if ((devname = blkid_get_devname(cache, attribute_name, value))) {
		/* do something with devname */
		string_free(devname);
	}

The cache parameter is optional; if it is NULL, then the blkid library
will load the default blkid.tab cache file, and then release the cache
before function call returns.  The return value is an allocated string
which holds the resulting device name (if it                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         