i = get_next_index(snappath, c->name);
- if (mkdir_p(snappath, 0755) < 0) {
+ if (lxc_mkdir_p(snappath, 0755) < 0) {
ERROR("Failed to create snapshot directory %s", snappath);
return -1;
}
*/
flags = LXC_CLONE_SNAPSHOT | LXC_CLONE_KEEPMACADDR | LXC_CLONE_KEEPNAME |
LXC_CLONE_KEEPBDEVTYPE | LXC_CLONE_MAYBE_SNAPSHOT;
- if (storage_is_dir(c->lxc_conf)) {
+ if (storage_lxc_is_dir(c->lxc_conf)) {
ERROR("Snapshot of directory-backed container requested");
ERROR("Making a copy-clone. If you do want snapshots, then");
ERROR("please create overlay clone first, snapshot that");
_exit(EXIT_FAILURE);
directory_path = dirname(tmp);
- ret = mkdir_p(directory_path, 0755);
+ ret = lxc_mkdir_p(directory_path, 0755);
if (ret < 0 && errno != EEXIST) {
SYSERROR("Failed to create path \"%s\"", directory_path);
free(tmp);
}
destdirname = dirname(dirdup);
- ret = mkdir_p(destdirname, 0755);
+ ret = lxc_mkdir_p(destdirname, 0755);
if (ret < 0) {
SYSERROR("Failed to create \"%s\"", destdirname);
free(dirdup);
char template[PATH_MAX], path[PATH_MAX];
pid_t pid, init_pid;
struct stat sb;
- bool is_dir;
+ bool lxc_is_dir;
int ret = -1, fd = -EBADF;
if (!c || !c->lxc_conf) {
}
}
- is_dir = (S_ISDIR(sb.st_mode) != 0);
- if (is_dir) {
+ lxc_is_dir = (S_ISDIR(sb.st_mode) != 0);
+ if (lxc_is_dir) {
sret = mkdtemp(template);
if (!sret) {
SYSERROR("Could not create shmounts temporary dir");
if (umount2(template, MNT_DETACH))
SYSWARN("Failed to remove temporary mount \"%s\"", template);
- if (is_dir)
+ if (lxc_is_dir)
(void)rmdir(template);
else
(void)unlink(template);