Whamcloud - gitweb
blkid: Flush cached filesystem information on any error other than EPERM
[tools/e2fsprogs.git] / lib / blkid / libblkid.3.in
1 .\" Copyright 2001 Andreas Dilger (adilger@turbolinux.com)
2 .\"
3 .\" This man page was created for libblkid.so.1.0 from e2fsprogs-1.24.
4 .\" 
5 .\" This file may be copied under the terms of the GNU Public License.
6 .\" 
7 .\" Created  Wed Sep 14 12:02:12 2001, Andreas Dilger
8 .TH LIBBLKID 3 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
9 .SH NAME
10 libblkid \- block device identification library
11 .SH SYNOPSIS
12 .B #include <blkid/blkid.h>
13 .sp
14 .B cc
15 .I file.c
16 .B \-lblkid
17 .SH DESCRIPTION
18 The
19 .B libblkid
20 library is used to identify block devices (disks) as to their content (e.g.
21 filesystem type) as well as extracting additional information such as
22 filesystem labels/volume names, unique identifiers/serial numbers, etc.
23 A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
24 specific block device names into configuration files.
25 .P
26 Block device information is normally kept in a cache file
27 .I /etc/blkid.tab
28 and is verified to still be valid before being returned to the user
29 (if the user has read permission on the raw block device, otherwise not).
30 The cache file also allows unprivileged users (normally anyone other
31 than root, or those not in the "disk" group) to locate devices by label/id.
32 .P
33 In situations where one is getting information about a single known device,
34 it does not impact performance whether the cache is used or not (unless you
35 are not able to read the block device directly).  If you are dealing with
36 multiple devices use of the cache is highly recommended (even if empty) as
37 devices will be scanned at most one time, and the on-disk cache will be
38 updated if possible.  There is rarely a reason not to use the cache.
39 .P
40 In some cases (modular kernels), block devices are not even visible until
41 after they are accessed the first time, so it is critical that there is
42 some way to locate these devices without enumerating only visible devices,
43 so the use of the cache file is
44 .B required
45 in this situation.
46 .SH AUTHOR
47 .B libblkid
48 was written by Andreas Dilger for the ext2 filesystem utilties, with input
49 from Ted Ts'o.  The library was subsequently heavily modified by Ted Ts'o.
50 .SH FILES
51 .TP
52 .I /etc/blkid.tab 
53 Caches data extracted from each recognized block device.
54 .SH AVAILABILITY
55 .B libblkid
56 is part of the e2fsprogs package since version 1.33 and is available from
57 http://e2fsprogs.sourceforge.net.
58 .SH COPYING
59 .B libblkid
60 is available under the terms of the GNU Library General Public License (LGPL),
61 version 2 (or at your discretion any later version).  A copy of the LGPL
62 should be included with this library in the file COPYING.  If not, write to
63 .RS
64 Free Software Foundation, Inc.
65 .br
66 59 Temple Place
67 .br
68 Suite 330
69 .br
70 Boston, MA  02111-1307  USA
71 .RE
72 .PP
73 or visit
74 .UR http://www.gnu.org/licenses/licenses.html#LGPL
75 http://www.gnu.org/licenses/licenses.html#LGPL
76 .UE
77 .SH "SEE ALSO"
78 .BR blkid_get_cache (3),
79 .BR blkid_put_cache (3),
80 .BR blkid_get_dev (3),
81 .BR blkid_probe_all (3),
82 .BR blkid_get_devname (3),
83 .BR blkid_get_tag_value (3),
84 .BR blkid.tab (7)