1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <https://www.gnu.org/licenses/>.
22 #include "_sd-common.h"
24 _SD_BEGIN_DECLARATIONS
;
29 SD_PATH_TEMPORARY_LARGE
,
31 /* Vendor supplied data */
32 SD_PATH_SYSTEM_BINARIES
,
33 SD_PATH_SYSTEM_INCLUDE
,
34 SD_PATH_SYSTEM_LIBRARY_PRIVATE
,
35 SD_PATH_SYSTEM_LIBRARY_ARCH
,
36 SD_PATH_SYSTEM_SHARED
,
37 SD_PATH_SYSTEM_CONFIGURATION_FACTORY
,
38 SD_PATH_SYSTEM_STATE_FACTORY
,
40 /* System configuration, runtime, state, ... */
41 SD_PATH_SYSTEM_CONFIGURATION
,
42 SD_PATH_SYSTEM_RUNTIME
,
43 SD_PATH_SYSTEM_RUNTIME_LOGS
,
44 SD_PATH_SYSTEM_STATE_PRIVATE
,
45 SD_PATH_SYSTEM_STATE_LOGS
,
46 SD_PATH_SYSTEM_STATE_CACHE
,
47 SD_PATH_SYSTEM_STATE_SPOOL
,
49 /* Vendor supplied data */
50 SD_PATH_USER_BINARIES
,
51 SD_PATH_USER_LIBRARY_PRIVATE
,
52 SD_PATH_USER_LIBRARY_ARCH
,
55 /* User configuration, state, runtime ... */
56 SD_PATH_USER_CONFIGURATION
,
58 SD_PATH_USER_STATE_CACHE
,
59 /* → SD_PATH_USER_STATE_PRIVATE is added at the bottom */
62 SD_PATH_USER
, /* $HOME itself */
63 SD_PATH_USER_DOCUMENTS
,
65 SD_PATH_USER_PICTURES
,
67 SD_PATH_USER_DOWNLOAD
,
69 SD_PATH_USER_TEMPLATES
,
73 SD_PATH_SEARCH_BINARIES
,
74 SD_PATH_SEARCH_BINARIES_DEFAULT
,
75 SD_PATH_SEARCH_LIBRARY_PRIVATE
,
76 SD_PATH_SEARCH_LIBRARY_ARCH
,
77 SD_PATH_SEARCH_SHARED
,
78 SD_PATH_SEARCH_CONFIGURATION_FACTORY
,
79 SD_PATH_SEARCH_STATE_FACTORY
,
80 SD_PATH_SEARCH_CONFIGURATION
,
82 /* Various systemd paths, generally mirroring systemd.pc — Except we drop the "dir" suffix (and
83 * replaces "path" by "search"), since this API is about dirs/paths anyway, and contains "path"
84 * already in the prefix */
87 SD_PATH_SYSTEMD_SYSTEM_UNIT
,
88 SD_PATH_SYSTEMD_SYSTEM_PRESET
,
89 SD_PATH_SYSTEMD_SYSTEM_CONF
,
90 SD_PATH_SYSTEMD_USER_UNIT
,
91 SD_PATH_SYSTEMD_USER_PRESET
,
92 SD_PATH_SYSTEMD_USER_CONF
,
94 SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT
,
95 SD_PATH_SYSTEMD_SEARCH_USER_UNIT
,
97 SD_PATH_SYSTEMD_SYSTEM_GENERATOR
,
98 SD_PATH_SYSTEMD_USER_GENERATOR
,
99 SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR
,
100 SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR
,
102 SD_PATH_SYSTEMD_SLEEP
,
103 SD_PATH_SYSTEMD_SHUTDOWN
,
109 SD_PATH_MODULES_LOAD
,
112 /* systemd-networkd search paths */
113 SD_PATH_SYSTEMD_SEARCH_NETWORK
,
115 /* systemd environment generators */
116 SD_PATH_SYSTEMD_SYSTEM_ENVIRONMENT_GENERATOR
,
117 SD_PATH_SYSTEMD_USER_ENVIRONMENT_GENERATOR
,
118 SD_PATH_SYSTEMD_SEARCH_SYSTEM_ENVIRONMENT_GENERATOR
,
119 SD_PATH_SYSTEMD_SEARCH_USER_ENVIRONMENT_GENERATOR
,
121 SD_PATH_USER_STATE_PRIVATE
,
126 int sd_path_lookup(uint64_t type
, const char *suffix
, char **path
);
127 int sd_path_lookup_strv(uint64_t type
, const char *suffix
, char ***paths
);
129 _SD_END_DECLARATIONS
;