Mirror of git://git.busybox.net/busybox with our patches on top
Source
xxxxxxxxxx
/* extern blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int whence); */
/* vi: set sw=4 ts=4: */
/*
* blkidP.h - Internal interfaces for libblkid
*
* Copyright (C) 2001 Andreas Dilger
* Copyright (C) 2003 Theodore Ts'o
*
* %Begin-Header%
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
* %End-Header%
*/
/*
* This describes the attributes of a specific device.
* We can traverse all of the tags by bid_tags (linking to the tag bit_names).
* The bid_label and bid_uuid fields are shortcuts to the LABEL and UUID tag
* values, if they exist.
*/
struct blkid_struct_dev
{
struct list_head bid_devs; /* All devices in the cache */
struct list_head bid_tags; /* All tags for this device */
blkid_cache bid_cache; /* Dev belongs to this cache */
char *bid_name; /* Device inode pathname */
char *bid_type; /* Preferred device TYPE */
int bid_pri; /* Device priority */
dev_t bid_devno; /* Device major/minor number */
time_t bid_time; /* Last update time of device */
unsigned int bid_flags; /* Device status bitflags */
char *bid_label; /* Shortcut to device LABEL */
char *bid_uuid; /* Shortcut to binary UUID */
};
/* Device data validated from disk */
/* Device is invalid */
/*
* Each tag defines a NAME=value pair for a particular device. The tags
* are linked via bit_names for a single device, so that traversing the
* names list will get you a list of all tags associated with a device.
* They are also linked via bit_values for all devices, so one can easily
* search all tags with a given NAME for a specific value.
*/
struct blkid_struct_tag
{
struct list_head bit_tags; /* All tags for this device */
struct list_head bit_names; /* All tags with given NAME */
char *bit_name; /* NAME of tag (shared) */
char *bit_val; /* value of tag */
blkid_dev bit_dev; /* pointer to device */
};
typedef struct blkid_struct_tag *blkid_tag;
/*
* Minimum number of seconds between device probes, even when reading
* from the cache. This is to avoid re-probing all devices which were
* just probed by another program that does not share the cache.
*/
/*
* Time in seconds an entry remains verified in the in-memory cache
* before being reverified (in case of long-running processes that
* keep a cache in memory and continue to use it for a long time).
*/
/* This describes an entire blkid cache file and probed devices.
* We can traverse all of the found devices via bic_list.
* We can traverse all of the tag types by bic_tags, which hold empty tags
* for each tag type. Those tags can be used as list_heads for iterating
* through all devices with a specific tag type (e.g. LABEL).
*/
struct blkid_struct_cache
{