/lxc/src/lxc/ |
H A D | freezer.c | 42 lxc_state_t freezer_state(const char *name, const char *lxcpath) argument 45 if (lxc_cgroup_get("freezer.state", v, 100, name, lxcpath) < 0) 53 static int do_freeze_thaw(int freeze, const char *name, const char *lxcpath) argument 58 if (lxc_cgroup_set("freezer.state", state, name, lxcpath) < 0) { 59 ERROR("Failed to freeze %s:%s", lxcpath, name); 63 if (lxc_cgroup_get("freezer.state", v, 100, name, lxcpath) < 0) { 64 ERROR("Failed to get new freezer state for %s:%s", lxcpath, name); 71 lxc_monitor_send_state(name, freeze ? FROZEN : THAWED, lxcpath); 78 int lxc_freeze(const char *name, const char *lxcpath) argument 80 lxc_monitor_send_state(name, FREEZING, lxcpath); 84 lxc_unfreeze(const char *name, const char *lxcpath) argument [all...] |
H A D | execute.c | 76 argv[i++] = "--lxcpath"; 77 argv[i++] = (char *)handler->lxcpath; 114 struct lxc_conf *conf, const char *lxcpath, bool backgrounded) 125 return __lxc_start(name, conf, &execute_start_ops, &args, lxcpath, backgrounded); 113 lxc_execute(const char *name, char *const argv[], int quiet, struct lxc_conf *conf, const char *lxcpath, bool backgrounded) argument
|
H A D | arguments.c | 146 -P, --lxcpath=PATH Use specified container path\n\ 163 const char *lxcpath) 167 fprintf(stderr, "This command only accepts %d -P,--lxcpath arguments\n", 172 args->lxcpath = realloc(args->lxcpath, (args->lxcpath_cnt + 1) * 173 sizeof(args->lxcpath[0])); 174 if (args->lxcpath == NULL) { 178 args->lxcpath[args->lxcpath_cnt++] = lxcpath; 234 ret = lxc_arguments_lxcpath_add(args, lxc_global_config_value("lxc.lxcpath")); 162 lxc_arguments_lxcpath_add(struct lxc_arguments *args, const char *lxcpath) argument [all...] |
H A D | start.h | 57 const char *lxcpath; member in struct:lxc_handler
|
H A D | state.c | 72 lxc_state_t lxc_getstate(const char *name, const char *lxcpath) argument 74 extern lxc_state_t freezer_state(const char *name, const char *lxcpath); 76 lxc_state_t state = freezer_state(name, lxcpath); 78 state = lxc_cmd_get_state(name, lxcpath); 109 const char *lxcpath) 118 if (lxc_monitord_spawn(lxcpath)) 121 fd = lxc_monitor_open(lxcpath); 130 state = lxc_getstate(lxcname, lxcpath); 108 lxc_wait(const char *lxcname, const char *states, int timeout, const char *lxcpath) argument
|
H A D | monitor.c | 55 int lxc_monitor_fifo_name(const char *lxcpath, char *fifo_path, size_t fifo_path_sz, argument 66 ret = snprintf(fifo_path, fifo_path_sz, "%s/lxc/%s", rundir, lxcpath); 68 ERROR("rundir/lxcpath (%s/%s) too long for monitor fifo.", rundir, lxcpath); 79 ret = snprintf(fifo_path, fifo_path_sz, "%s/lxc/%s/monitor-fifo", rundir, lxcpath); 81 ERROR("rundir/lxcpath (%s/%s) too long for monitor fifo.", rundir, lxcpath); 89 static void lxc_monitor_fifo_send(struct lxc_msg *msg, const char *lxcpath) argument 96 ret = lxc_monitor_fifo_name(lxcpath, fifo_path, sizeof(fifo_path), 0); 131 const char *lxcpath) 130 lxc_monitor_send_state(const char *name, lxc_state_t state, const char *lxcpath) argument 140 lxc_monitor_send_exit_code(const char *name, int exit_code, const char *lxcpath) argument 165 lxc_monitor_sock_name(const char *lxcpath, struct sockaddr_un *addr) argument 206 lxc_monitor_open(const char *lxcpath) argument 308 lxc_monitord_spawn(const char *lxcpath) argument [all...] |
H A D | lxc_monitord.c | 58 * @lxcpath : the path being monitored 67 const char *lxcpath; member in struct:lxc_monitor 85 ret = lxc_monitor_fifo_name(mon->lxcpath, fifo_path, sizeof(fifo_path), 1); 108 DEBUG("lxc-monitord already running on lxcpath %s.", mon->lxcpath); 120 ret = lxc_monitor_fifo_name(mon->lxcpath, fifo_path, sizeof(fifo_path), 0); 236 if (lxc_monitor_sock_name(mon->lxcpath, &addr) < 0) 253 if (lxc_monitor_sock_name(mon->lxcpath, &addr) < 0) 350 char *lxcpath = argv[1]; local 356 "Usage: lxc-monitord lxcpath syn [all...] |
H A D | lxclock.c | 106 * "/run" + "/lxc/lock/$lxcpath/$lxcname + '\0' if root 108 * $XDG_RUNTIME_DIR + "/lxc/lock/$lxcpath/$lxcname + '\0' if non-root 111 /* length of "/lxc/lock/" + $lxcpath + "/" + "." + $lxcname + '\0' */ 161 struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name) argument 180 l->u.f.fname = lxclock_name(lxcpath, name);
|
/lxc/src/tests/ |
H A D | may_control.c | 26 printf("Usage: %s name [lxcpath]\n", me); 32 const char *lxcpath = NULL, *name; local 40 lxcpath = argv[2]; 41 c = lxc_container_new(name, lxcpath);
|
H A D | cgpath.c | 48 static int test_running_container(const char *lxcpath, argument 59 if ((c = lxc_container_new(name, lxcpath)) == NULL) { 121 static int test_container(const char *lxcpath, argument 128 if (lxcpath) { 129 ret = mkdir(lxcpath, 0755); 131 TSTERR("failed to mkdir %s %s", lxcpath, strerror(errno)); 137 if ((c = lxc_container_new(name, lxcpath)) == NULL) { 144 c = lxc_container_new(name, lxcpath); 158 ret = test_running_container(lxcpath, group, name);
|
H A D | list.c | 25 static void test_list_func(const char *lxcpath, const char *type, argument 34 n = func(lxcpath, NULL, NULL); 37 n2 = func(lxcpath, NULL, &clist); 51 n2 = func(lxcpath, &names, NULL); 64 n2 = func(lxcpath, &names, &clist); 83 const char *lxcpath = NULL; local 86 lxcpath = argv[1]; 88 test_list_func(lxcpath, "Defined:", list_defined_containers); 89 test_list_func(lxcpath, "Active:", list_active_containers); 90 test_list_func(lxcpath, "Al [all...] |
H A D | console.c | 113 * @lxcpath : the lxcpath in which to create the container 118 static int test_console(const char *lxcpath, argument 125 if (lxcpath) { 126 ret = mkdir(lxcpath, 0755); 128 TSTERR("failed to mkdir %s %s", lxcpath, strerror(errno)); 134 if ((c = lxc_container_new(name, lxcpath)) == NULL) { 141 c = lxc_container_new(name, lxcpath);
|
H A D | attach.c | 297 * @lxcpath : the lxcpath in which to create the container 302 static struct lxc_container *test_ct_create(const char *lxcpath, argument 309 if (lxcpath) { 310 ret = mkdir(lxcpath, 0755); 312 TSTERR("failed to mkdir %s %s", lxcpath, strerror(errno)); 317 if ((ct = lxc_container_new(name, lxcpath)) == NULL) { 324 ct = lxc_container_new(name, lxcpath); 349 static int test_attach(const char *lxcpath, const char *name, const char *template) argument 354 TSTOUT("Testing attach with on lxcpath [all...] |
/lxc/src/lxc/bdev/ |
H A D | lxcdir.c | 39 const char *cname, const char *oldpath, const char *lxcpath, 52 len = strlen(lxcpath) + strlen(cname) + strlen("rootfs") + 3; 56 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname); 38 dir_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
H A D | lxcloop.c | 44 * called $lxcpath/$lxcname/rootdev 47 const char *cname, const char *oldpath, const char *lxcpath, 63 len = strlen(lxcpath) + strlen(cname) + strlen("rootdev") + 3; 65 ret = snprintf(srcdev, len, "%s/%s/rootdev", lxcpath, cname); 79 ret = snprintf(new->dest, len, "%s/%s/rootfs", lxcpath, cname); 116 // dest is passed in as $lxcpath / $lxcname / rootfs 117 // srcdev will be: $lxcpath / $lxcname / rootdev 46 loop_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
H A D | lxcrbd.c | 39 const char *cname, const char *oldpath, const char *lxcpath, 38 rbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
H A D | lxcaufs.c | 41 const char *oldpath, const char *lxcpath); 44 const char *cname, const char *oldpath, const char *lxcpath, 55 new->dest = dir_new_path(orig->dest, oldname, cname, oldpath, lxcpath); 118 ndelta = dir_new_path(odelta, oldname, cname, oldpath, lxcpath); 170 * $lxcpath/$lxcname/rootfs to have the created container, while all 172 * $lxcpath/$lxcname/delta0 355 char lxcpath[MAXPATHLEN]; local 391 ret = snprintf(lxcpath, MAXPATHLEN, "%s/%s", lxc_path, lxc_name); 408 else if ((strncmp(upperdir, lxcpath, strlen(lxcpath)) 43 aufs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument [all...] |
H A D | lxclvm.c | 49 const char *oldpath, const char *lxcpath); 279 const char *cname, const char *oldpath, const char *lxcpath, int snap, 305 new->src = dir_new_path(orig->src, oldname, cname, oldpath, lxcpath); 316 len = strlen(lxcpath) + strlen(cname) + strlen("rootfs") + 3; 320 ret = snprintf(new->dest, len, "%s/%s/rootfs", lxcpath, cname); 278 lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
H A D | lxcnbd.c | 91 const char *cname, const char *oldpath, const char *lxcpath, 90 nbd_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
H A D | lxczfs.c | 44 * have lxc-create specify $lxcpath/$lxcname/rootfs as the mountpoint, so that 119 const char *nname, const char *lxcpath, int snapshot) 141 ret = snprintf(option, MAXPATHLEN, "-omountpoint=%s/%s/rootfs", lxcpath, nname); 145 // zfs create -omountpoint=$lxcpath/$lxcname $zfsroot/$nname 205 const char *cname, const char *oldpath, const char *lxcpath, int snap, 218 len = strlen(lxcpath) + strlen(cname) + strlen("rootfs") + 3; 223 ret = snprintf(new->src, len, "%s/%s/rootfs", lxcpath, cname); 230 return zfs_clone(orig->src, new->src, oldname, cname, lxcpath, snap); 118 zfs_clone(const char *opath, const char *npath, const char *oname, const char *nname, const char *lxcpath, int snapshot) argument 204 zfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, const char *cname, const char *oldpath, const char *lxcpath, int snap, uint64_t newsize, struct lxc_conf *conf) argument
|
/lxc/src/lxc/tools/ |
H A D | lxc_clone.c | 78 printf(" [-p lxcpath] [-P newlxcpath] orig new\n"); 89 printf(" -p: use container orig from custom lxcpath\n"); 90 printf(" -P: create container new in custom lxcpath\n"); 105 { "lxcpath", required_argument, 0, 'p'}, 118 char *bdevtype = NULL, *lxcpath = NULL, *newpath = NULL, *fstype = NULL; local 142 case 'p': lxcpath = optarg; break; 178 c1 = lxc_container_new(orig, lxcpath);
|
H A D | lxc_destroy.c | 49 --name=NAME [-f] [-P lxcpath]\n\ 79 my_args.progname, my_args.quiet, my_args.lxcpath[0])) 85 c = lxc_container_new(my_args.name, my_args.lxcpath[0]); 203 char *lxcpath = NULL; local 240 while ((lxcpath = strtok_r(!counter ? buf : NULL, "\n", &scratch))) { 243 c1 = lxc_container_new(lxcname, lxcpath);
|
H A D | lxc_init.c | 49 { "lxcpath", required_argument, NULL, 'P' }, 67 " -P, --lxcpath=PATH Use specified container path\n" 85 char *lxcpath = NULL, *name = NULL, *logpriority = NULL; local 99 lxcpath = optarg; 108 basename(argv[0]), quiet, lxcpath);
|
H A D | lxc_start.c | 96 static int pid_from_lxcname(const char *lxcname_or_pid, const char *lxcpath) { argument 101 s = lxc_container_new(lxcname_or_pid, lxcpath); 230 my_args.progname, my_args.quiet, my_args.lxcpath[0])) 234 if (access(my_args.lxcpath[0], O_RDONLY) < 0) { 236 fprintf(stderr, "You lack access to %s\n", my_args.lxcpath[0]); 240 const char *lxcpath = my_args.lxcpath[0]; local 245 * 2. rcfile not specified, use $lxcpath/$lxcname/config 251 c = lxc_container_new(my_args.name, lxcpath); 270 rc = asprintf(&rcfile, "%s/%s/config", lxcpath, my_arg [all...] |
/lxc/src/lxc/cgroups/ |
H A D | cgroup.c | 179 bool cgroup_attach(const char *name, const char *lxcpath, pid_t pid) argument 182 return ops->attach(name, lxcpath, pid); 186 int lxc_cgroup_set(const char *filename, const char *value, const char *name, const char *lxcpath) argument 189 return ops->set(filename, value, name, lxcpath); 193 int lxc_cgroup_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath) argument 196 return ops->get(filename, value, len, name, lxcpath);
|