/lxc/src/lxc/ |
H A D | monitor.h | 42 int value; member in struct:lxc_msg
|
H A D | nl.c | 80 extern int nla_put_u32(struct nlmsg *nlmsg, int attr, int value) argument 82 return nla_put(nlmsg, attr, &value, sizeof(value)); 85 extern int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value) argument 87 return nla_put(nlmsg, attr, &value, 2);
|
H A D | attach.c | 497 long value; local 522 value = token ? strtol(token, &endptr, 10) : 0; 523 if (!token || !endptr || *endptr || value == LONG_MIN || value == LONG_MAX) 526 if ((uid_t) value != uid) 617 long value = -1; local 632 ret = sscanf(line, "Uid: %ld", &value); 634 uid = (uid_t) value; 636 ret = sscanf(line, "Gid: %ld", &value); 638 gid = (gid_t) value; [all...] |
H A D | network.c | 482 * Others means error happened, and ret-value is the error number. 914 static int proc_sys_net_write(const char *path, const char *value) argument 922 if (write(fd, value, strlen(value)) < 0)
|
H A D | conf.h | 145 * @value : the value to set 149 char *value; member in struct:lxc_cgroup
|
H A D | confile.c | 316 static int config_string_item(char **conf_item, const char *value) argument 320 if (!value || strlen(value) == 0) { 326 new_value = strdup(value); 328 SYSERROR("failed to strdup '%s': %m", value); 337 static int config_string_item_max(char **conf_item, const char *value, argument 340 if (strlen(value) >= max) { 341 ERROR("%s is too long (>= %lu)", value, (unsigned long)max); 345 return config_string_item(conf_item, value); 348 static int config_path_item(char **conf_item, const char *value) argument 359 config_network_nic(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 394 config_network(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 407 config_network_type(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 554 network_netdev(const char *key, const char *value, struct lxc_list *network) argument 579 network_ifname(char **valuep, const char *value) argument 600 macvlan_mode(int *valuep, const char *value) argument 656 config_network_flags(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 670 config_network_link(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 682 config_network_name(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 694 config_network_veth_pair(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 710 config_network_macvlan_mode(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 726 config_network_hwaddr(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 754 config_network_vlan_id(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 773 config_network_mtu(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 785 config_network_ipv4(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 876 config_network_ipv4_gateway(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 914 config_network_ipv6(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 978 config_network_ipv6_gateway(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1016 config_network_script_up(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1028 config_network_script_down(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1054 config_seccomp(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1060 config_init_cmd(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1066 config_init_uid(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1078 config_init_gid(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1090 config_hook(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1130 config_personality(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1143 config_pts(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1152 config_start(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1176 config_monitor(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1188 config_group(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1234 config_environment(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1261 config_tty(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1270 config_ttydir(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1276 config_kmsg(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1288 config_lsm_aa_profile(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1294 config_lsm_aa_incomplete(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1308 config_lsm_se_context(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1314 config_logfile(const char *key, const char *value, struct lxc_conf *c) argument 1327 config_loglevel(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1347 config_autodev(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1408 config_haltsignal(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1420 config_rebootsignal(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1432 config_stopsignal(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1444 config_cgroup(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1503 config_idmap(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1564 config_fstab(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1572 config_mount_auto(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1638 config_mount(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1663 config_cap_keep(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1712 config_cap_drop(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1758 config_console(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1764 config_console_logfile(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1871 config_includefile(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1880 config_rootfs(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1886 config_rootfs_mount(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1892 config_rootfs_options(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1898 config_rootfs_backend(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1913 config_pivotdir(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1920 config_utsname(const char *key, const char *value, struct lxc_conf *lxc_conf) argument 1956 char *value; local 2972 config_ephemeral(const char *key, const char *value, struct lxc_conf *lxc_conf) argument [all...] |
H A D | conf.c | 243 int value; member in struct:caps_opt 2141 capid = caps_opt[i].value; 4308 free(cg->value);
|
H A D | lxccontainer.c | 2133 ERROR("Error writing new snapshots value"); 2283 // TODO: Figure out what to do with the return value of fscanf. 2574 static bool do_lxcapi_set_cgroup_item(struct lxc_container *c, const char *subsys, const char *value) argument 2587 ret = lxc_cgroup_set(subsys, value, c->name, c->config_path); 3807 char value[MAX_BUFFER]; local 3825 ret = snprintf(value, MAX_BUFFER, "c %d:%d rwm", major(st.st_rdev), minor(st.st_rdev)); 3827 ret = snprintf(value, MAX_BUFFER, "b %d:%d rwm", major(st.st_rdev), minor(st.st_rdev)); 3840 if (!do_lxcapi_set_cgroup_item(c, "devices.allow", value)) { 3845 if (!do_lxcapi_set_cgroup_item(c, "devices.deny", value)) {
|
/lxc/src/lxc/tools/ |
H A D | lxc_cgroup.c | 53 --name=NAME state-object [value]\n\ 55 Get or set the value of a state object (for example, 'cpuset.cpus')\n\ 68 char *state_object = NULL, *value = NULL; local 116 value = my_args.argv[1]; 117 if (!c->set_cgroup_item(c, state_object, value)) { 118 ERROR("failed to assign '%s' value to '%s' for '%s'", 119 value, state_object, my_args.name); 127 ERROR("failed to retrieve value of '%s' for '%s:%s'",
|
H A D | lxc_config.c | 63 const char *value; local 71 value = lxc_get_global_config_item(i->name); 72 if (value) 73 printf("%s\n", value);
|
H A D | lxc_attach.c | 81 static int add_to_simple_array(char ***array, ssize_t *capacity, char *value) argument 105 (*array)[count] = value;
|
H A D | lxc_autostart.c | 266 char* value = NULL; local 273 value = (char*) malloc(sizeof(char)*len + 1); 274 if (value == NULL) 277 if (c->get_config_item(c, key, value, len + 1) != len) { 278 free(value); 282 if (strlen(value) == 0) { 283 free(value); 287 config_list = get_list(value, "\n"); 288 free(value); 296 char* value local [all...] |
H A D | lxc_info.c | 261 static void print_info_msg_int(const char *key, int value) argument 264 printf("%-15s %d\n", key, value); 267 printf("%d\n", value); 269 printf("%-15s %d\n", key, value); 274 static void print_info_msg_str(const char *key, const char *value) argument 277 printf("%-15s %s\n", key, value); 280 printf("%s\n", value); 282 printf("%-15s %s\n", key, value);
|
/lxc/src/tests/ |
H A D | cgpath.c | 55 char value[NAME_MAX], value_save[NAME_MAX]; local 78 /* test get/set value using memory.soft_limit_in_bytes file */ 79 ret = lxc_cgroup_get("memory.soft_limit_in_bytes", value, sizeof(value), 85 strcpy(value_save, value); 92 ret = lxc_cgroup_get("memory.soft_limit_in_bytes", value, sizeof(value), 98 if (strcmp(value, "536870912\n")) { 99 TSTERR("lxc_cgroup_set_bypath failed to set value >%s<", value); [all...] |
/lxc/src/lxc/cgroups/ |
H A D | cgroup.c | 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);
|
H A D | cgfs.c | 139 static int do_cgroup_get(const char *cgroup_path, const char *sub_filename, char *value, size_t len); 140 static int do_cgroup_set(const char *cgroup_path, const char *sub_filename, const char *value); 1275 /* ignore return value here, perhaps we created the 1353 static int lxc_cgroup_set_data(const char *filename, const char *value, struct cgfs_data *d) argument 1366 ret = do_cgroup_set(path, filename, value); 1374 static int lxc_cgroupfs_set(const char *filename, const char *value, const char *name, const char *lxcpath) argument 1386 ret = do_cgroup_set(path, filename, value); 1392 static int lxc_cgroupfs_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath) argument 1404 ret = do_cgroup_get(path, filename, value, len); 1962 char *value, size_ 1961 do_cgroup_get(const char *cgroup_path, const char *sub_filename, char *value, size_t len) argument 1983 do_cgroup_set(const char *cgroup_path, const char *sub_filename, const char *value) argument 2241 char value[1024]; local [all...] |
H A D | cgfsng.c | 565 char *lastslash, *value = NULL, *fpath, oldv; local 580 value = must_alloc(len + 1); 581 if (lxc_read_from_file(fpath, value, len) != len) 586 ret = lxc_write_to_file(fpath, value, len, false); 588 SYSERROR("Unable to write %s to %s", value, fpath); 590 free(value); 596 free(value); 1861 static int cgfsng_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath) argument 1879 ret = lxc_read_from_file(fullpath, value, len); 1893 static int cgfsng_set(const char *filename, const char *value, cons argument 1924 lxc_cgroup_set_data(const char *filename, const char *value, struct cgfsng_handler_data *d) argument [all...] |
H A D | cgmanager.c | 937 static int cgm_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath) argument 950 do_cgm_get(name, lxcpath, filename, p[1], len && value); 958 if (!len || !value) { 963 memset(value, 0, len); 975 ret = read(p[0], value, readlen); 982 value[len-1] = '\0'; 986 value[newlen++] = '\n'; 987 value[newlen] = '\0'; 996 static void do_cgm_set(const char *name, const char *lxcpath, const char *filename, const char *value, int outp) argument 999 int retval = 0; // value w 1073 cgm_set(const char *filename, const char *value, const char *name, const char *lxcpath) argument [all...] |
/lxc/src/lua-lxc/ |
H A D | core.c | 314 char *value; local 320 value = alloca(sizeof(char)*len + 1); 321 if (c->get_cgroup_item(c, key, value, len + 1) != len) 324 lua_pushstring(L, value); 337 char *value; local 343 value = alloca(sizeof(char)*len + 1); 344 if (c->get_config_item(c, key, value, len + 1) != len) 347 lua_pushstring(L, value); 359 const char *value = luaL_checkstring(L, 3); local 361 lua_pushboolean(L, !!c->set_cgroup_item(c, key, value)); 369 const char *value = luaL_checkstring(L, 3); local 380 char *value; local 546 char *value; local [all...] |
/lxc/src/python-lxc/ |
H A D | lxc.c | 337 const char* value = NULL; local 343 value = lxc_get_global_config_item(key); 345 if (!value) { 350 return PyUnicode_FromString(value); 905 char* value; local 919 value = (char*) malloc(sizeof(char)*len + 1); 920 if (value == NULL) 924 key, value, len + 1) != len) { 925 PyErr_SetString(PyExc_ValueError, "Unable to read config value"); 926 free(value); 941 char* value; local 995 char* value; local 1142 char* value = NULL; local 1278 char *value = NULL; local 1296 char *value = NULL; local [all...] |