Searched refs:value (Results 1 - 25 of 30) sorted by relevance

12

/lxc/src/lxc/tools/
H A Dlxc_config.c63 const char *value; local
71 value = lxc_get_global_config_item(i->name);
72 if (value)
73 printf("%s\n", value);
H A Dlxc_autostart.c266 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 Dlxc_cgroup.c53 --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 Dlxc_info.c261 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);
H A Dlxc_monitor.c183 msg.name, lxc_state2str(msg.value));
187 msg.name, WEXITSTATUS(msg.value));
/lxc/src/lxc/
H A Dconfile.c316 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 Dlxc.h99 * Set a specified value for a specified subsystem. The specified
102 * @value : the value to be set
107 extern int lxc_cgroup_set(const char *filename, const char *value, const char *name, const char *lxcpath);
110 * Get a specified value for a specified subsystem. The specified
113 * @value : the value to be set
114 * @len : the len of the value variable
119 extern int lxc_cgroup_get(const char *filename, char *value, size_t len, const char *name, const char *lxcpath);
H A Dnl.h69 * fill the handler with the right value
162 int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
168 * @attr: the attribute name of the unsigned 16-bit value
169 * @value: 16-bit attribute data value to be copied to the netlink message
173 int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value);
H A Dstate.c176 if (msg.value < 0 || msg.value >= MAX_STATE)
179 if (s[msg.value]) {
H A Dmonitor.h42 int value; member in struct:lxc_msg
H A Dnl.c80 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 Dattach.c497 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 Dlxccontainer.h272 * \brief Set a key/value configuration option.
276 * \param value Value of \p name to set.
280 bool (*set_config_item)(struct lxc_container *c, const char *key, const char *value);
397 * \brief Retrieve the value of a config item.
401 * \param[out] retv Caller-allocated buffer to write value of \p key
402 * into (or \c NULL to determine length of value).
405 * \return Length of config items value, or < 0 on error.
408 * \p retv by initially passing its value as \c NULL and considering the return value.
411 * \note If \p inlen is smaller than required, the value writte
[all...]
H A Dmonitor.c133 struct lxc_msg msg = {.type = lxc_msg_state, .value = state};
143 struct lxc_msg msg = {.type = lxc_msg_exit_code, .value = exit_code};
/lxc/src/python-lxc/lxc/
H A D__init__.py89 def __setattr__(self, key, value):
91 return object.__setattr__(self, key, value)
97 return self.__set_network_item(self.props[key], value)
111 def __set_network_item(self, key, value):
113 self.index, key), value)
200 def append_config_item(self, key, value):
202 Append 'value' to 'key', assuming 'key' is a list.
203 If 'key' isn't a list, 'value' will be set as the value of 'key'.
206 return _lxc.Container.set_config_item(self, key, value)
[all...]
/lxc/src/tests/
H A Dcgpath.c55 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/lua-lxc/
H A Dcore.c314 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...]
H A Dlxc.lua167 function container:append_config_item(key, value)
168 return self.core:set_config_item(key, value)
180 local value
183 value = self.core:get_config_item(key)
186 if (not value or not string.find(value, "\n")) then
187 return value
191 vals = value:split("\n", 1000)
199 function container:set_cgroup_item(key, value)
200 return self.core:set_cgroup_item(key, value)
[all...]
/lxc/src/python-lxc/
H A Dlxc.c337 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...]
/lxc/src/lxc/cgroups/
H A Dcgroup.c186 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 Dcgroup.h53 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);
H A Dcgfsng.c565 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 Dcgfs.c139 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 Dcgmanager.c937 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/templates/
H A Dlxc-gentoo.in517 value=$(echo "${line}" | sed 's/^.*_real_ugly_sep_42_//')
522 [[ "${value}" == "empty" ]] && continue
535 nic_type="${value}"
547 nic_name="${value}"
552 container_conf_net "${value}"

Completed in 766 milliseconds

12