Searched defs:ret (Results 1 - 25 of 80) sorted by relevance

1234

/lxc/src/lxc/
H A Derror.c44 int ret = 0; local
47 ret = WEXITSTATUS(status);
48 if (ret)
49 INFO("Child <%d> ended on error (%d).", pid, ret);
57 return ret;
H A Dsync.c39 ssize_t ret; local
41 ret = read(fd, &sync, sizeof(sync));
42 if (ret < 0) {
47 if (!ret)
50 if ((size_t)ret != sizeof(sync)) {
51 ERROR("unexpected sync size: %zu expected %zu", (size_t)ret, sizeof(sync));
119 int ret; local
121 ret = socketpair(AF_LOCAL, SOCK_STREAM, 0, handler->sv);
122 if (ret) {
H A Dgenl.c42 int len, ret; local
61 ret = netlink_open(&handler, NETLINK_GENERIC);
62 if (ret)
65 ret = nla_put_string((struct nlmsg *)&request->nlmsghdr,
67 if (ret)
70 ret = netlink_transaction(&handler, (struct nlmsg *)&request->nlmsghdr,
72 if (ret < 0)
78 ret = -ENOMSG;
85 ret = -EMSGSIZE;
93 ret
108 int ret; local
[all...]
H A Dnamespace.c58 pid_t ret; local
61 ret = __clone2(do_clone, stack,
64 ret = clone(do_clone, stack + stack_size, flags | SIGCHLD, &clone_arg);
66 if (ret < 0)
69 return ret;
H A Daf_unix.c171 int ret, *val; local
185 ret = recvmsg(fd, &msg, 0);
186 if (ret <= 0)
202 return ret;
244 int ret; local
258 ret = recvmsg(fd, &msg, 0);
259 if (ret <= 0)
274 return ret;
H A Darguments.c186 int ret = 0; local
188 ret = build_shortopts(args->options, shortopts, sizeof(shortopts));
189 if (ret < 0) {
192 return ret;
209 ret = lxc_arguments_lxcpath_add(args, optarg);
210 if (ret < 0)
211 return ret;
219 ret = args->parser(args, c, optarg);
220 if (ret)
234 ret
[all...]
/lxc/src/tests/
H A Dcreatetest.c34 int ret = 1; local
38 ret = 1;
87 ret = 0;
90 exit(ret);
H A Dshutdowntest.c35 int ret = 1; local
39 ret = 1;
94 ret = 0;
101 exit(ret);
H A Ddevice_add_remove.c28 int ret = 1; local
67 ret = 0;
71 return ret;
H A Ddestroytest.c33 int status, ret; local
41 ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
47 ret = waitpid(pid, &status, 0);
48 if (ret == -1) {
54 if (ret != pid)
66 int ret = 1; local
70 ret = 1;
100 ret = 0;
103 exit(ret);
H A Dgetkeys.c35 int len, ret; local
40 ret = 1;
49 ret = 1;
52 ret = c->get_keys(c, NULL, v3, len+1);
53 if (ret != len) {
54 fprintf(stderr, "%d: failed to get keys (%d)\n", __LINE__, ret);
55 ret = 1;
58 printf("get_keys returned %d\n%s", ret, v3);
60 ret = c->get_keys(c, "lxc.network.0", v3, 2000);
61 if (ret <
[all...]
H A Dsaveconfig.c33 int status, ret; local
41 ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
47 ret = waitpid(pid, &status, 0);
48 if (ret == -1) {
54 if (ret != pid)
66 int ret = 1; local
70 ret = 1;
112 ret = 0;
115 exit(ret);
H A Dclonetest.c35 int ret = 1; local
52 ret = 1;
117 ret = 0;
163 ret = 0;
177 exit(ret);
H A Dcgpath.c51 int ret = -1; local
79 ret = lxc_cgroup_get("memory.soft_limit_in_bytes", value, sizeof(value),
81 if (ret < 0) {
87 ret = lxc_cgroup_set("memory.soft_limit_in_bytes", "512M", c->name, c->config_path);
88 if (ret < 0) {
89 TSTERR("lxc_cgroup_set failed %d %d", ret, errno);
92 ret = lxc_cgroup_get("memory.soft_limit_in_bytes", value, sizeof(value),
94 if (ret < 0) {
104 ret = lxc_cgroup_set("memory.soft_limit_in_bytes", value_save,
106 if (ret <
125 int ret; local
171 int ret = EXIT_FAILURE; local
[all...]
H A Dget_item.c35 int ret = EXIT_FAILURE; local
48 ret = c->get_config_item(c, "lxc.hook.pre-start", v2, 255);
49 if (ret < 0) {
50 fprintf(stderr, "%d: get_config_item(lxc.hook.pre-start) returned %d\n", __LINE__, ret);
53 fprintf(stderr, "lxc.hook.pre-start returned %d %s\n", ret, v2);
55 ret = c->get_config_item(c, "lxc.network", v2, 255);
56 if (ret < 0) {
57 fprintf(stderr, "%d: get_config_item returned %d\n", __LINE__, ret);
60 fprintf(stderr, "%d: get_config_item(lxc.network) returned %d %s\n", __LINE__, ret, v2);
65 ret
[all...]
H A Dreboot.c50 pid_t ret; local
52 ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
53 if (ret < 0) {
80 int ret; local
86 ret = fscanf(f, "%d", &v);
88 if (ret != 1)
90 ret = reboot(v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF);
91 if (ret != -1)
H A Dsnapshot.c93 int ret; local
96 ret = stat(path, &sb);
97 if (ret != 0) {
H A Dstartone.c35 int status, ret; local
43 ret = execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
49 ret = waitpid(pid, &status, 0);
50 if (ret == -1) {
56 if (ret != pid)
67 int status, ret; local
75 ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
81 ret = waitpid(pid, &status, 0);
82 if (ret == -1) {
88 if (ret !
100 int ret = 0; local
[all...]
H A Dlocktests.c35 int ret, status; local
74 ret = waitpid(pid, &status, WNOHANG);
75 if (ret == pid) { // task exited
84 } else if (ret < 0) {
98 int ret; local
106 ret = lxclock(lock, 0);
107 if (ret) {
108 fprintf(stderr, "%d: failed to take unnamed lock (%d)\n", __LINE__, ret);
112 ret = lxcunlock(lock);
113 if (ret) {
[all...]
H A Dcontainertests.c35 int status, ret; local
43 ret = execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
49 ret = waitpid(pid, &status, 0);
50 if (ret == -1) {
56 if (ret != pid)
67 int status, ret; local
75 ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
81 ret = waitpid(pid, &status, 0);
82 if (ret == -1) {
88 if (ret !
100 int ret = 0; local
[all...]
/lxc/src/lxc/tools/
H A Dlxc_cgroup.c125 int ret = c->get_cgroup_item(c, state_object, buffer, MAXPATHLEN); local
126 if (ret < 0) {
132 printf("%*s", ret, buffer);
H A Dlxc_console.c99 int ret; local
102 ret = lxc_arguments_parse(&my_args, argc, argv);
103 if (ret)
109 ret = lxc_log_init(my_args.name, my_args.log_file, my_args.log_priority,
111 if (ret)
148 ret = c->console(c, my_args.ttynum, 0, 1, 2, my_args.escape);
149 if (ret < 0) {
H A Dlxc_device.c105 bool ret = false; local
161 ret = c->attach_interface(c, dev_name, dst_name);
163 ret = c->add_device_node(c, dev_name, dst_name);
165 if (ret != true) {
172 ret = c->detach_interface(c, dev_name, dst_name);
174 ret = c->remove_device_node(c, dev_name, dst_name);
176 if (ret != true) {
H A Dlxc_execute.c109 int ret; local
163 ret = lxc_execute(my_args.name, my_args.argv, my_args.quiet, conf, my_args.lxcpath[0], false);
167 if (ret < 0)
169 exit(ret);
H A Dlxc_create.c39 uint64_t ret; local
42 ret = strtoull(s, &end, 0);
51 ret *= 1024ULL * 1024ULL; // MB by default
53 ret *= 1ULL;
55 ret *= 1024ULL;
57 ret *= 1024ULL * 1024ULL;
59 ret *= 1024ULL * 1024ULL * 1024ULL;
61 ret *= 1024ULL * 1024ULL * 1024ULL * 1024ULL;
67 return ret;

Completed in 22 milliseconds

1234