Lines Matching defs:ret
35 int ret = EXIT_FAILURE;
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 = c->get_config_item(c, "lxc.tty", v2, 255);
66 if (ret < 0) {
67 fprintf(stderr, "%d: get_config_item(lxc.tty) returned %d\n", __LINE__, ret);
70 fprintf(stderr, "lxc.tty returned %d %s\n", ret, v2);
76 ret = c->get_config_item(c, "lxc.arch", v2, 255);
77 if (ret < 0) {
78 fprintf(stderr, "%d: get_config_item(lxc.arch) returned %d\n", __LINE__, ret);
81 printf("lxc.arch returned %d %s\n", ret, v2);
87 ret = c->get_config_item(c, "lxc.init_uid", v2, 255);
88 if (ret < 0) {
89 fprintf(stderr, "%d: get_config_item(lxc.init_uid) returned %d\n", __LINE__, ret);
92 printf("lxc.init_uid returned %d %s\n", ret, v2);
98 ret = c->get_config_item(c, "lxc.init_gid", v2, 255);
99 if (ret < 0) {
100 fprintf(stderr, "%d: get_config_item(lxc.init_gid) returned %d\n", __LINE__, ret);
103 printf("lxc.init_gid returned %d %s\n", ret, v2);
129 ret = c->get_config_item(c, "lxc.utsname", alloced, len+1);
130 if (ret < 0) {
131 fprintf(stderr, "%d: get_config_item(lxc.utsname) returned %d\n", __LINE__, ret);
134 if (strcmp(alloced, HNAME) != 0 || ret != len) {
135 fprintf(stderr, "lxc.utsname returned wrong value: %d %s not %d %s\n", ret, alloced, len, HNAME);
145 ret = c->get_config_item(c, "lxc.mount.entry", v2, 255);
146 if (ret < 0) {
147 fprintf(stderr, "%d: get_config_item(lxc.mount.entry) returned %d\n", __LINE__, ret);
150 printf("lxc.mount.entry returned %d %s\n", ret, v2);
156 ret = c->get_config_item(c, "lxc.aa_profile", v2, 255);
157 if (ret < 0) {
158 fprintf(stderr, "%d: get_config_item(lxc.aa_profile) returned %d\n", __LINE__, ret);
161 printf("lxc.aa_profile returned %d %s\n", ret, v2);
189 ret = c->get_config_item(c, "lxc.cap.drop", NULL, 300);
190 if (ret < 5 || ret > 255) {
191 fprintf(stderr, "%d: get_config_item(lxc.cap.drop) with NULL returned %d\n", __LINE__, ret);
194 ret = c->get_config_item(c, "lxc.cap.drop", v1, 1);
195 if (ret < 5 || ret > 255) {
196 fprintf(stderr, "%d: get_config_item(lxc.cap.drop) returned %d\n", __LINE__, ret);
199 ret = c->get_config_item(c, "lxc.cap.drop", v2, 255);
200 if (ret < 0) {
201 fprintf(stderr, "%d: get_config_item(lxc.cap.drop) returned %d %s\n", __LINE__, ret, v2);
204 printf("%d: get_config_item(lxc.cap.drop) returned %d %s\n", __LINE__, ret, v2);
205 ret = c->get_config_item(c, "lxc.network", v2, 255);
206 if (ret < 0) {
207 fprintf(stderr, "%d: get_config_item returned %d\n", __LINE__, ret);
210 printf("%d: get_config_item(lxc.network) returned %d %s\n", __LINE__, ret, v2);
217 ret = c->get_config_item(c, "lxc.network.0.ipv4", v2, 255);
218 if (ret <= 0) {
219 fprintf(stderr, "%d: lxc.network.0.ipv4 returned %d\n", __LINE__, ret);
226 ret = c->get_config_item(c, "lxc.network.0.ipv4", v2, 255);
227 if (ret != 0) {
228 fprintf(stderr, "%d: after clearing ipv4 entries get_item(lxc.network.0.ipv4 returned %d\n", __LINE__, ret);
237 ret = c->get_config_item(c, "lxc.network.0.ipv4.gateway", v2, 255);
238 if (ret <= 0) {
239 fprintf(stderr, "%d: lxc.network.0.ipv4.gateway returned %d\n", __LINE__, ret);
246 ret = c->get_config_item(c, "lxc.network.0.ipv4.gateway", v2, 255);
247 if (ret != 0) {
248 fprintf(stderr, "%d: after clearing ipv4.gateway get_item(lxc.network.0.ipv4.gateway returned %d\n", __LINE__, ret);
252 ret = c->get_config_item(c, "lxc.network.0.link", v2, 255);
253 if (ret < 0) {
254 fprintf(stderr, "%d: get_config_item returned %d\n", __LINE__, ret);
257 printf("%d: get_config_item (link) returned %d %s\n", __LINE__, ret, v2);
258 ret = c->get_config_item(c, "lxc.network.0.name", v2, 255);
259 if (ret < 0) {
260 fprintf(stderr, "%d: get_config_item returned %d\n", __LINE__, ret);
263 printf("%d: get_config_item (name) returned %d %s\n", __LINE__, ret, v2);
269 ret = c->get_config_item(c, "lxc.network", v2, 255);
270 if (ret != 0) {
271 fprintf(stderr, "%d: network was not actually cleared (get_network returned %d)\n", __LINE__, ret);
275 ret = c->get_config_item(c, "lxc.cgroup", v3, 2047);
276 if (ret < 0) {
277 fprintf(stderr, "%d: get_config_item(cgroup.devices) returned %d\n", __LINE__, ret);
280 printf("%d: get_config_item (cgroup.devices) returned %d %s\n", __LINE__, ret, v3);
282 ret = c->get_config_item(c, "lxc.cgroup.devices.allow", v3, 2047);
283 if (ret < 0) {
284 fprintf(stderr, "%d: get_config_item(cgroup.devices.devices.allow) returned %d\n", __LINE__, ret);
287 printf("%d: get_config_item (cgroup.devices.devices.allow) returned %d %s\n", __LINE__, ret, v3);
306 ret = EXIT_SUCCESS;
310 exit(ret);