Tags evaluation

Tags evaluation — top-level API for LABEL and UUID evaluation.

Synopsis

char *              blkid_evaluate_tag                  (const char *token,
                                                         const char *value,
                                                         blkid_cache *cache);

Description

This API provides very simple and portable way how evaluate LABEL and UUID tags. The blkid_evaluate_tag() works on 2.4 and 2.6 systems and on systems with or without udev. Currently, the libblkid library supports "udev" and "scan" methods. The "udev" method uses udev /dev/disk/by-* symlinks and the "scan" method scans all block devices from the /proc/partitions file. The evaluation could be controlled by the /etc/blkid.conf config file. The default is to try "udev" and then "scan" method.

The blkid_evaluate_tag() also automatically informs udevd when an obsolete /dev/disk/by-* symlink is detected.

If you are not sure how translate LABEL or UUID to the device name use this API.

Details

blkid_evaluate_tag ()

char *              blkid_evaluate_tag                  (const char *token,
                                                         const char *value,
                                                         blkid_cache *cache);

token :

token name (e.g "LABEL" or "UUID")

value :

token data

cache :

pointer to cache (or NULL when you don't want to re-use the cache)

Returns :

allocated string with a device name.