]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/import-util.h
core: hook up MountFlags= to the transient unit logic
[thirdparty/systemd.git] / src / shared / import-util.h
CommitLineData
56ebfaf1
LP
1#pragma once
2
3/***
4 This file is part of systemd.
5
6 Copyright 2015 Lennart Poettering
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
22#include <stdbool.h>
23
3d7415f4 24#include "macro.h"
98c38001 25
8f695058
LP
26typedef enum ImportVerify {
27 IMPORT_VERIFY_NO,
7f444afa 28 IMPORT_VERIFY_CHECKSUM,
8f695058
LP
29 IMPORT_VERIFY_SIGNATURE,
30 _IMPORT_VERIFY_MAX,
31 _IMPORT_VERIFY_INVALID = -1,
32} ImportVerify;
33
85dbc41d
LP
34int import_url_last_component(const char *url, char **ret);
35int import_url_change_last_component(const char *url, const char *suffix, char **ret);
8f695058
LP
36
37const char* import_verify_to_string(ImportVerify v) _const_;
38ImportVerify import_verify_from_string(const char *s) _pure_;
98c38001 39
3d7415f4
LP
40int tar_strip_suffixes(const char *name, char **ret);
41int raw_strip_suffixes(const char *name, char **ret);
42
8c9cfc28 43int import_assign_pool_quota_and_warn(const char *path);