blob: bd24cb1a2af34811a6937e40e93e65d09cde335b [file] [log] [blame]
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -05001.\" Copyright 2001 Andreas Dilger (adilger@turbolinux.com)
2.\"
3.\" This man page was created for libblkid.so.1.0 from e2fsprogs-1.24.
Benno Schulenbergdcf051e2008-07-31 22:49:19 +02004.\"
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -05005.\" This file may be copied under the terms of the GNU Public License.
Benno Schulenbergdcf051e2008-07-31 22:49:19 +02006.\"
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -05007.\" 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
10libblkid \- 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
18The
19.B libblkid
20library is used to identify block devices (disks) as to their content (e.g.
21filesystem type) as well as extracting additional information such as
22filesystem labels/volume names, unique identifiers/serial numbers, etc.
23A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
24specific block device names into configuration files.
25.P
26Block device information is normally kept in a cache file
27.I /etc/blkid.tab
28and 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).
30The cache file also allows unprivileged users (normally anyone other
31than root, or those not in the "disk" group) to locate devices by label/id.
Theodore Ts'o5010f292008-02-09 23:35:03 -050032The standard location of the cache file can be overridden by the
33environment variable BLKID_FILE.
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050034.P
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050035In situations where one is getting information about a single known device,
36it does not impact performance whether the cache is used or not (unless you
37are not able to read the block device directly). If you are dealing with
Benno Schulenbergdcf051e2008-07-31 22:49:19 +020038multiple devices, use of the cache is highly recommended (even if empty) as
39devices will be scanned at most one time and the on-disk cache will be
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050040updated if possible. There is rarely a reason not to use the cache.
41.P
42In some cases (modular kernels), block devices are not even visible until
43after they are accessed the first time, so it is critical that there is
44some way to locate these devices without enumerating only visible devices,
45so the use of the cache file is
46.B required
47in this situation.
48.SH AUTHOR
49.B libblkid
50was written by Andreas Dilger for the ext2 filesystem utilties, with input
Theodore Ts'o28595222003-03-01 20:01:27 -050051from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o.
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050052.SH FILES
53.TP
Benno Schulenbergdcf051e2008-07-31 22:49:19 +020054.I /etc/blkid.tab
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050055Caches data extracted from each recognized block device.
56.SH AVAILABILITY
57.B libblkid
Theodore Ts'o28595222003-03-01 20:01:27 -050058is part of the e2fsprogs package since version 1.33 and is available from
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050059http://e2fsprogs.sourceforge.net.
60.SH COPYING
61.B libblkid
62is available under the terms of the GNU Library General Public License (LGPL),
63version 2 (or at your discretion any later version). A copy of the LGPL
64should be included with this library in the file COPYING. If not, write to
65.RS
66Free Software Foundation, Inc.
67.br
Benno Schulenbergdcf051e2008-07-31 22:49:19 +02006851 Franklin St
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050069.br
Benno Schulenbergdcf051e2008-07-31 22:49:19 +020070Fifth Floor
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050071.br
Benno Schulenbergdcf051e2008-07-31 22:49:19 +020072Boston, MA 02110-1301 USA
Theodore Ts'oe12f2ae2003-01-23 16:45:16 -050073.RE
74.PP
75or visit
76.UR http://www.gnu.org/licenses/licenses.html#LGPL
77http://www.gnu.org/licenses/licenses.html#LGPL
78.UE
79.SH "SEE ALSO"
Benno Schulenbergdcf051e2008-07-31 22:49:19 +020080.BR blkid (8)