]>
Commit | Line | Data |
---|---|---|
f2d5a09d CB |
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 | ||
f2d5a09d CB |
27 | #include <stdbool.h> |
28 | #include <stdint.h> | |
d38dd64a | 29 | #include <stdio.h> |
f2d5a09d CB |
30 | |
31 | #include "conf.h" | |
32 | ||
10bc1861 | 33 | struct lxc_storage; |
f2d5a09d CB |
34 | struct lxc_conf; |
35 | ||
f2d5a09d CB |
36 | extern bool attach_block_device(struct lxc_conf *conf); |
37 | extern void detach_block_device(struct lxc_conf *conf); | |
10bc1861 CB |
38 | extern int blk_getsize(struct lxc_storage *bdev, uint64_t *size); |
39 | extern int detect_fs(struct lxc_storage *bdev, char *type, int len); | |
f2d5a09d | 40 | extern int do_mkfs_exec_wrapper(void *args); |
10bc1861 | 41 | extern int is_blktype(struct lxc_storage *b); |
f2d5a09d CB |
42 | extern int mount_unknown_fs(const char *rootfs, const char *target, |
43 | const char *options); | |
44 | extern int find_fstype_cb(char *buffer, void *data); | |
41dc7155 | 45 | extern const char *linkderef(const char *path, char *dest); |
10bc1861 | 46 | extern bool unpriv_snap_allowed(struct lxc_storage *b, const char *t, bool snap, |
f2d5a09d | 47 | bool maybesnap); |
2b670dfe | 48 | extern uint64_t get_fssize(char *s); |
10bc1861 CB |
49 | extern bool is_valid_storage_type(const char *type); |
50 | extern int storage_destroy_wrapper(void *data); | |
f2d5a09d | 51 | |
10bc1861 | 52 | #endif /* __LXC_STORAGE_UTILS_H */ |