/lxc/src/lxc/tools/ |
H A D | lxc_config.c | 29 char *name; member in struct:lxc_config_items 34 { .name = "lxc.default_config", }, 35 { .name = "lxc.lxcpath", }, 36 { .name = "lxc.bdev.lvm.vg", }, 37 { .name = "lxc.bdev.lvm.thin_pool", }, 38 { .name = "lxc.bdev.zfs.root", }, 39 { .name = "lxc.cgroup.use", }, 40 { .name = "lxc.cgroup.pattern", }, 41 { .name = NULL, }, 55 for (i = &items[0]; i->name; [all...] |
H A D | lxc_unfreeze.c | 43 --name=NAME\n\ 48 -n, --name=NAME NAME of the container\n\ 65 if (lxc_log_init(my_args.name, my_args.log_file, my_args.log_priority, 70 c = lxc_container_new(my_args.name, my_args.lxcpath[0]); 72 ERROR("No such container: %s:%s", my_args.lxcpath[0], my_args.name); 77 ERROR("Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name); 98 ERROR("Failed to unfreeze %s:%s", my_args.lxcpath[0], my_args.name);
|
/lxc/src/tests/ |
H A D | lxc-test-checkpoint-restore | 29 name=lxc-test-criu 30 lxc-create -t ubuntu -n $name || FAIL "creating container" 32 cat >> "$(lxc-config lxc.lxcpath)/$name/config" <<EOF 39 lxc-start -n $name -d || FAIL "starting container" 40 lxc-wait -n $name -s RUNNING || FAIL "waiting for container to run" 47 lxc-checkpoint -n $name -v -s -D /tmp/checkpoint || FAIL "failed checkpointing" 48 lxc-wait -n $name -s STOPPED 49 lxc-checkpoint -n $name -v -r -D /tmp/checkpoint || FAIL "failed restoring" 51 lxc-stop -n $name -k 52 lxc-destroy -f -n $name [all...] |
H A D | lxc-test-ubuntu | 45 # need a different name for each container so dnsmasq doesn't 48 name=$(uuidgen) 50 name=lxc-test-$template 53 lxc-create -t $template -n $name || FAIL "creating $template container" 54 lxc-start -n $name -d || FAIL "starting $template container" 55 lxc-wait -n $name -s RUNNING || FAIL "waiting for $template container to run" 58 lxcip=$(lxc-info -i -n $name -H | head -n 1) 71 lxcpid=`lxc-info -n $name -p -H` 78 lxc-stop -n $name -k 79 lxc-destroy -n $name [all...] |
H A D | may_control.c | 26 printf("Usage: %s name [lxcpath]\n", me); 32 const char *lxcpath = NULL, *name; local 38 name = argv[1]; 41 c = lxc_container_new(name, lxcpath); 44 printf("You may%s control %s\n", may ? "" : " not", name);
|
H A D | cgpath.c | 45 * @group : name of the container group or NULL for default "lxc" 46 * @name : name of the container 49 const char *group, const char *name) 57 sprintf(relpath, "%s/%s", group ? group : "lxc", name); 59 if ((c = lxc_container_new(name, lxcpath)) == NULL) { 60 TSTERR("container %s couldn't instantiate", name); 64 TSTERR("container %s does not exist", name); 68 cgrelpath = lxc_cmd_get_cgroup_path(c->name, c->config_path, "freezer"); 80 c->name, 48 test_running_container(const char *lxcpath, const char *group, const char *name) argument 121 test_container(const char *lxcpath, const char *group, const char *name, const char *template) argument [all...] |
/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); 70 if (name) 71 lxc_monitor_send_state(name, freeze ? FROZEN : THAWED, lxcpath); 78 int lxc_freeze(const char *name, cons argument 84 lxc_unfreeze(const char *name, const char *lxcpath) argument [all...] |
H A D | network.h | 40 extern int lxc_netdev_delete_by_name(const char *name); 44 * Change the device name 49 extern int netdev_set_flag(const char *name, int flag); 55 extern int lxc_netdev_isup(const char *name); 56 extern int lxc_netdev_up(const char *name); 57 extern int lxc_netdev_down(const char *name); 62 extern int lxc_netdev_set_mtu(const char *name, int mtu); 68 extern int lxc_macvlan_create(const char *master, const char *name, int mode); 69 extern int lxc_vlan_create(const char *master, const char *name, unsigned short vid); 74 extern int lxc_ip_forward_on(const char *name, in [all...] |
H A D | lxc.h | 48 * @name : the name of the container 54 extern int lxc_start(const char *name, char *const argv[], struct lxc_conf *conf, 59 * @name : the name of the container 66 extern int lxc_execute(const char *name, char *const argv[], int quiet, 78 * Freeze all the tasks running inside the container <name> 79 * @name : the container name 82 extern int lxc_freeze(const char *name, cons [all...] |
H A D | commands.h | 71 extern int lxc_cmd_console_winch(const char *name, const char *lxcpath); 72 extern int lxc_cmd_console(const char *name, int *ttynum, int *fd, 78 extern char *lxc_cmd_get_cgroup_path(const char *name, const char *lxcpath, 80 extern int lxc_cmd_get_clone_flags(const char *name, const char *lxcpath); 81 extern char *lxc_cmd_get_config_item(const char *name, const char *item, const char *lxcpath); 84 extern pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath); 85 extern lxc_state_t lxc_cmd_get_state(const char *name, const char *lxcpath); 86 extern int lxc_cmd_stop(const char *name, const char *lxcpath); 91 extern int lxc_cmd_init(const char *name, struct lxc_handler *handler, 93 extern int lxc_cmd_mainloop_add(const char *name, struc [all...] |
H A D | start.h | 47 char *name; member in struct:lxc_handler 66 extern int lxc_poll(const char *name, struct lxc_handler *handler); 67 extern int lxc_set_state(const char *name, struct lxc_handler *handler, lxc_state_t state); 68 extern void lxc_abort(const char *name, struct lxc_handler *handler); 69 extern struct lxc_handler *lxc_init(const char *name, struct lxc_conf *, const char *); 70 extern void lxc_fini(const char *name, struct lxc_handler *handler);
|
H A D | state.h | 31 extern int lxc_rmstate(const char *name); 32 extern lxc_state_t lxc_getstate(const char *name, const char *lxcpath);
|
H A D | log.h | 93 const char* name; member in struct:lxc_log_appender 104 const char *name; member in struct:lxc_log_category 158 static inline int lxc_log_priority_to_int(const char* name) argument 160 if (!strcasecmp("TRACE", name)) return LXC_LOG_PRIORITY_TRACE; 161 if (!strcasecmp("DEBUG", name)) return LXC_LOG_PRIORITY_DEBUG; 162 if (!strcasecmp("INFO", name)) return LXC_LOG_PRIORITY_INFO; 163 if (!strcasecmp("NOTICE", name)) return LXC_LOG_PRIORITY_NOTICE; 164 if (!strcasecmp("WARN", name)) return LXC_LOG_PRIORITY_WARN; 165 if (!strcasecmp("ERROR", name)) return LXC_LOG_PRIORITY_ERROR; 166 if (!strcasecmp("CRIT", name)) retur [all...] |
H A D | monitor.h | 41 char name[NAME_MAX+1]; member in struct:lxc_msg 48 extern void lxc_monitor_send_state(const char *name, lxc_state_t state, 50 extern void lxc_monitor_send_exit_code(const char *name, int exit_code,
|
H A D | log.c | 239 .name = "stderr", 245 .name = "logfile", 251 .name = "root", 258 .name = "lxc", 265 static int build_dir(const char *name) argument 267 char *n = strdup(name); // because we'll be modifying it 272 ERROR("Out of memory while creating directory '%s'.", name); 296 static int log_open(const char *name) argument 301 fd = lxc_unpriv(open(name, O_CREAT | O_WRONLY | 304 ERROR("failed to open log file \"%s\" : %s", name, 326 build_log_path(const char *name, const char *lxcpath) argument 426 _lxc_log_set_file(const char *name, const char *lxcpath, int create_dirs) argument 446 lxc_log_init(const char *name, const char *file, const char *priority, const char *prefix, int quiet, const char *lxcpath) argument [all...] |
H A D | start.c | 83 const char *name); 330 int lxc_set_state(const char *name, struct lxc_handler *handler, lxc_state_t state) argument 333 lxc_monitor_send_state(name, state, handler->lxcpath); 337 int lxc_poll(const char *name, struct lxc_handler *handler) argument 358 if (lxc_cmd_mainloop_add(name, &descr, handler)) { 385 struct lxc_handler *lxc_init(const char *name, struct lxc_conf *conf, const char *lxcpath) argument 406 handler->name = strdup(name); 407 if (!handler->name) { 412 if (lxc_cmd_init(name, handle 495 lxc_fini(const char *name, struct lxc_handler *handler) argument 576 lxc_abort(const char *name, struct lxc_handler *handler) argument 1059 const char *name = handler->name; local 1299 __lxc_start(const char *name, struct lxc_conf *conf, struct lxc_operations* ops, void *data, const char *lxcpath, bool backgrounded) argument 1456 lxc_start(const char *name, char *const argv[], struct lxc_conf *conf, const char *lxcpath, bool backgrounded) argument 1467 lxc_destroy_container_on_signal(struct lxc_handler *handler, const char *name) argument [all...] |
H A D | commands.c | 80 const char *name; local 86 name = lxcname; 87 if (!name) 88 name = ""; 107 ret = snprintf(path, len, "%s/%s/command", lxcpath, name); 115 /* ret >= len; lxcpath or name is too long. hash both */ 116 tmplen = strlen(name) + strlen(lxcpath) + 2; 118 ret = snprintf(tmppath, tmplen, "%s/%s", lxcpath, name); 126 ERROR("Command socket name too long"); 264 * @name 279 lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped, const char *lxcpath, const char *hashed_sock_name) argument 348 lxc_try_cmd(const char *name, const char *lxcpath) argument 388 lxc_cmd_get_init_pid(const char *name, const char *lxcpath) argument 418 lxc_cmd_get_clone_flags(const char *name, const char *lxcpath) argument 452 lxc_cmd_get_cgroup_path(const char *name, const char *lxcpath, const char *subsystem) argument 511 lxc_cmd_get_config_item(const char *name, const char *item, const char *lxcpath) argument 566 lxc_cmd_get_state(const char *name, const char *lxcpath) argument 607 lxc_cmd_stop(const char *name, const char *lxcpath) argument 669 lxc_cmd_console_winch(const char *name, const char *lxcpath) argument 703 lxc_cmd_console(const char *name, int *ttynum, int *fd, const char *lxcpath) argument 980 lxc_cmd_init(const char *name, struct lxc_handler *handler, const char *lxcpath) argument 1016 lxc_cmd_mainloop_add(const char *name, struct lxc_epoll_descr *descr, struct lxc_handler *handler) argument [all...] |
H A D | attach.h | 39 extern int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_function, void* exec_payload, lxc_attach_options_t* options, pid_t* attached_process);
|
H A D | parse.h | 26 typedef int (*lxc_dir_cb)(const char *name, const char *directory,
|
/lxc/src/python-lxc/examples/ |
H A D | pyconsole.py | 36 sys.exit("Usage: %s container-name [ttynum [escape]]" % sys.argv[0]) 45 (ct.name, ttynum, ord('a') + escape-1)) 48 sys.exit("Container %s not defined" % ct.name) 50 sys.exit("Container %s not running" % ct.name)
|
/lxc/src/lxc/cgroups/ |
H A D | cgroup.c | 44 INFO("cgroup driver %s", ops->name); 57 INFO("Initialized cgroup driver %s", ops->name); 68 INFO("cgroup driver %s initing for %s", ops->name, handler->name); 69 handler->cgroup_data = ops->init(handler->name); 174 WARN("CGROUP driver %s doesn't implement nrtasks", ops->name); 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, lxcpat 193 lxc_cgroup_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath) argument [all...] |
H A D | cgroup.h | 42 const char *name; member in struct:cgroup_ops 44 void *(*init)(const char *name); 53 int (*set)(const char *filename, const char *value, const char *name, const char *lxcpath); 54 int (*get)(const char *filename, char *value, size_t len, const char *name, const char *lxcpath); 58 bool (*attach)(const char *name, const char *lxcpath, pid_t pid); 65 extern bool cgroup_attach(const char *name, const char *lxcpath, pid_t pid);
|
/lxc/src/include/ |
H A D | openpty.c | 37 int openpty (int *amaster, int *aslave, char *name, struct termios *termp, argument 68 if (name != NULL) 69 strcpy(name, buf);
|
/lxc/src/lxc/lsm/ |
H A D | lsm.c | 48 INFO("LSM security driver %s", drv->name); 62 INFO("Initialized LSM security driver %s", drv->name); 75 return drv->name;
|
H A D | nop.c | 44 .name = "nop",
|