libblkid Reference Manual | ||||
---|---|---|---|---|
Top | Description |
char * blkid_evaluate_tag (const char *token
,const char *value
,blkid_cache *cache
); char * blkid_evaluate_spec (const char *spec
,blkid_cache *cache
);
This API provides very simple and portable way how evaluate LABEL and UUID
tags. The blkid_evaluate_tag()
and blkid_evaluate_spec()
work 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.
char * blkid_evaluate_tag (const char *token
,const char *value
,blkid_cache *cache
);
|
token name (e.g "LABEL" or "UUID") or unparsed tag (e.g. "LABEL=foo") |
|
token data (e.g. "foo") |
|
pointer to cache (or NULL when you don't want to re-use the cache) |
Returns : |
allocated string with a device name. |
char * blkid_evaluate_spec (const char *spec
,blkid_cache *cache
);
All returned paths are canonicalized, device-mapper paths are converted to the /dev/mapper/name format.
|
unparsed tag (e.g. "LABEL=foo") or path (e.g. /dev/dm-0) |
|
pointer to cache (or NULL when you don't want to re-use the cache) |
Returns : |
allocated string with a device name. |