]> git.ipfire.org Git - thirdparty/util-linux.git/blame - libblkid/libblkid.3
docs: (man) remove double quotes (") in .SH lines
[thirdparty/util-linux.git] / libblkid / libblkid.3
CommitLineData
a0948ffe
KZ
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.\"
03915524
KZ
5.\" This file may be copied under the terms of the GNU Lesser General Public
6.\" License.
a0948ffe
KZ
7.\"
8.\" Created Wed Sep 14 12:02:12 2001, Andreas Dilger
232dc924 9.TH LIBBLKID 3 "May 2009" "util-linux" "Programmer's Manual"
a0948ffe
KZ
10.SH NAME
11libblkid \- block device identification library
12.SH SYNOPSIS
8e368761 13.B #include <blkid.h>
a0948ffe
KZ
14.sp
15.B cc
16.I file.c
17.B \-lblkid
18.SH DESCRIPTION
19The
20.B libblkid
eb024893 21library is used to identify block devices (disks) as to their content (e.g.,
a0948ffe 22filesystem type) as well as extracting additional information such as
c632883f 23filesystem labels/volume names, unique identifiers/serial numbers.
a0948ffe
KZ
24A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
25specific block device names into configuration files.
26.P
455fe9a0 27The low-level part of the library also allows to extract information about
c632883f
KZ
28partitions and block device topology.
29.P
b82590ad
KZ
30The high-level part of the library keeps information about block devices in a
31cache file and is verified to still be valid before being returned to the user
a0948ffe
KZ
32(if the user has read permission on the raw block device, otherwise not).
33The cache file also allows unprivileged users (normally anyone other
34than root, or those not in the "disk" group) to locate devices by label/id.
35The standard location of the cache file can be overridden by the
36environment variable BLKID_FILE.
37.P
c632883f
KZ
38In situations where one is getting information about a single known device, it
39does not impact performance whether the cache is used or not (unless you are
c6f285fc 40not able to read the block device directly).
c632883f
KZ
41.P
42The high-level part of the library supports two methods to evaluate LABEL/UUID.
43It reads information directly from a block device or read information from
c6f285fc 44/dev/disk/by-* udev symlinks. The udev is preferred method by default.
c632883f
KZ
45.P
46If you are dealing with
a0948ffe
KZ
47multiple devices, use of the cache is highly recommended (even if empty) as
48devices will be scanned at most one time and the on-disk cache will be
c632883f 49updated if possible.
a0948ffe
KZ
50.P
51In some cases (modular kernels), block devices are not even visible until
52after they are accessed the first time, so it is critical that there is
53some way to locate these devices without enumerating only visible devices,
54so the use of the cache file is
55.B required
56in this situation.
0eb0aff9
KZ
57.SH CONFIGURATION FILE
58The standard location of the
59.I /etc/blkid.conf
c6f285fc 60config file can be overridden by the environment variable BLKID_CONF. For more
b82590ad
KZ
61details about the config file see
62.BR blkid (8)
63man page.
a0948ffe
KZ
64.SH AUTHOR
65.B libblkid
d35df4db 66was written by Andreas Dilger for the ext2 filesystem utilities, with input
a0948ffe 67from Ted Ts'o. The library was subsequently heavily modified by Ted Ts'o.
0eb0aff9
KZ
68
69The low-level probing code was rewritten by Karel Zak.
a0948ffe
KZ
70.SH COPYING
71.B libblkid
72is available under the terms of the GNU Library General Public License (LGPL),
c632883f 73version 2 (or at your discretion any later version).
5a829806 74.SH SEE ALSO
66083665 75.BR blkid (8),
fc7a1669 76.BR findfs (8)
9c91fc03
BS
77.SH AVAILABILITY
78libblkid is part of the util-linux package since version 2.15 and is available from
d673b74e 79https://www.kernel.org/pub/linux/utils/util-linux/.