]> git.sesse.net Git - plocate/blob - conf.h
Release plocate 1.1.22.
[plocate] / conf.h
1 /* updatedb configuration.
2
3 Copyright (C) 2005, 2007, 2008 Red Hat, Inc. All rights reserved.
4 This copyrighted material is made available to anyone wishing to use, modify,
5 copy, or redistribute it subject to the terms and conditions of the GNU General
6 Public License v.2.
7
8 This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10 PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License along with
13 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
14 Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
16 Author: Miloslav Trmac <mitr@redhat.com>
17
18 plocate modifications: Copyright (C) 2020 Steinar H. Gunderson.
19 plocate parts and modifications are licensed under the GPLv2 or, at your option,
20 any later version.
21 */
22
23 #ifndef CONF_H__
24 #define CONF_H__
25
26 #include <stddef.h>
27 #include <string>
28 #include <vector>
29
30 /* true if locate(1) should check whether files are visible before reporting
31    them */
32 extern bool conf_check_visibility;
33
34 /* Filesystems to skip, converted to uppercase and sorted by name */
35 extern std::vector<std::string> conf_prunefs;
36
37 /* Directory names to skip, sorted by name */
38 extern std::vector<std::string> conf_prunenames;
39
40 /* Paths to skip, sorted by name using dir_path_cmp () */
41 extern std::vector<std::string> conf_prunepaths;
42
43 /* true if bind mounts should be skipped */
44 extern bool conf_prune_bind_mounts;
45
46 /* true if pruning debug output was requested */
47 extern bool conf_debug_pruning;
48
49 /* Root of the directory tree to store in the database (canonical) */
50 extern char *conf_scan_root;
51
52 /* Absolute (not necessarily canonical) path to the database */
53 extern std::string conf_output;
54
55 /* true if file names should be written to stdout as they are found */
56 extern bool conf_verbose;
57
58 /* Configuration representation for the database configuration block */
59 extern std::string conf_block;
60
61 /* Parse /etc/updatedb.conf and command-line arguments ARGC, ARGV.
62    Exit on error or --help, --version. */
63 extern void conf_prepare(int argc, char *argv[]);
64
65 extern int conf_block_size;
66 extern bool use_debug;
67
68 #endif