]>
git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/storage/storage_utils.h
2 * lxc: linux Container library
4 * Copyright © 2017 Canonical Ltd.
7 * Christian Brauner <christian.brauner@ubuntu.com>
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.
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.
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
24 #ifndef __LXC_STORAGE_UTILS_H
25 #define __LXC_STORAGE_UTILS_H
36 extern bool attach_block_device(struct lxc_conf
*conf
);
37 extern void detach_block_device(struct lxc_conf
*conf
);
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
);
40 extern int do_mkfs_exec_wrapper(void *args
);
41 extern int is_blktype(struct lxc_storage
*b
);
42 extern int mount_unknown_fs(const char *rootfs
, const char *target
,
44 extern int find_fstype_cb(char *buffer
, void *data
);
45 extern const char *linkderef(const char *path
, char *dest
);
46 extern bool unpriv_snap_allowed(struct lxc_storage
*b
, const char *t
, bool snap
,
48 extern uint64_t get_fssize(char *s
);
49 extern bool is_valid_storage_type(const char *type
);
50 extern int storage_destroy_wrapper(void *data
);
52 #endif /* __LXC_STORAGE_UTILS_H */