]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/storage/storage_utils.h
Merge pull request #2008 from tych0/share-ns-in-execute
[mirror_lxc.git] / src / lxc / storage / storage_utils.h
1 /*
2 * lxc: linux Container library
3 *
4 * Copyright © 2017 Canonical Ltd.
5 *
6 * Authors:
7 * Christian Brauner <christian.brauner@ubuntu.com>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #ifndef __LXC_STORAGE_UTILS_H
25 #define __LXC_STORAGE_UTILS_H
26
27 #include "config.h"
28 #include <stdio.h>
29 #include <stdbool.h>
30 #include <stdint.h>
31
32 #include "conf.h"
33
34 struct lxc_storage;
35 struct lxc_conf;
36
37 extern char *dir_new_path(char *src, const char *oldname, const char *name,
38 const char *oldpath, const char *lxcpath);
39 extern bool attach_block_device(struct lxc_conf *conf);
40 extern void detach_block_device(struct lxc_conf *conf);
41 extern int blk_getsize(struct lxc_storage *bdev, uint64_t *size);
42 extern int detect_fs(struct lxc_storage *bdev, char *type, int len);
43 extern int do_mkfs_exec_wrapper(void *args);
44 extern int is_blktype(struct lxc_storage *b);
45 extern int mount_unknown_fs(const char *rootfs, const char *target,
46 const char *options);
47 extern int find_fstype_cb(char *buffer, void *data);
48 extern const char *linkderef(const char *path, char *dest);
49 extern bool unpriv_snap_allowed(struct lxc_storage *b, const char *t, bool snap,
50 bool maybesnap);
51 extern bool is_valid_storage_type(const char *type);
52 extern int storage_destroy_wrapper(void *data);
53
54 #endif /* __LXC_STORAGE_UTILS_H */