int ret;
if ((ret = pthread_mutex_lock(l)) != 0) {
- fprintf(stderr, "pthread_mutex_lock returned:%d %s", ret, strerror(ret));
+ fprintf(stderr, "pthread_mutex_lock returned:%d %s\n", ret, strerror(ret));
exit(1);
}
}
int ret;
if ((ret = pthread_mutex_unlock(l)) != 0) {
- fprintf(stderr, "pthread_mutex_unlock returned:%d %s", ret, strerror(ret));
+ fprintf(stderr, "pthread_mutex_unlock returned:%d %s\n", ret, strerror(ret));
exit(1);
}
}
ret = snprintf(path, PATH_MAX, "/proc/%d/%cid_map", pid, idtype == ID_TYPE_UID ? 'u' : 'g');
if (ret < 0 || ret >= PATH_MAX) {
- fprintf(stderr, "%s: path name too long", __func__);
+ fprintf(stderr, "%s: path name too long\n", __func__);
return -E2BIG;
}
f = fopen(path, "w");
* of a container */
err = setup_private_host_hw_addr(n1);
if (err) {
- fprintf(stderr, "failed to change mac address of host interface '%s' : %s",
+ fprintf(stderr, "failed to change mac address of host interface '%s' : %s\n",
n1, strerror(-err));
}
nic = alloca(100);
if (fstat(fd, &sb) < 0) {
- fprintf(stderr, "Failed to fstat: %s", strerror(errno));
+ fprintf(stderr, "Failed to fstat: %s\n", strerror(errno));
return false;
}
len = sb.st_size;
return false;
if (fstat(fd, &sb) < 0) {
- fprintf(stderr, "Failed to fstat: %s", strerror(errno));
+ fprintf(stderr, "Failed to fstat: %s\n", strerror(errno));
return false;
}
len = sb.st_size;
c->config_path = strdup(lxc_global_config_value("lxc.lxcpath"));
if (!c->config_path) {
- fprintf(stderr, "Out of memory");
+ fprintf(stderr, "Out of memory\n");
goto err;
}
int ret;
if ((ret = pthread_mutex_lock(l)) != 0) {
- fprintf(stderr, "pthread_mutex_lock returned:%d %s", ret, strerror(ret));
+ fprintf(stderr, "pthread_mutex_lock returned:%d %s\n", ret, strerror(ret));
dump_stacktrace();
exit(1);
}
int ret;
if ((ret = pthread_mutex_unlock(l)) != 0) {
- fprintf(stderr, "pthread_mutex_unlock returned:%d %s", ret, strerror(ret));
+ fprintf(stderr, "pthread_mutex_unlock returned:%d %s\n", ret, strerror(ret));
dump_stacktrace();
exit(1);
}
}
}
if (args[j].return_code) {
- fprintf(stderr, "thread returned error %d", args[j].return_code);
+ fprintf(stderr, "thread returned error %d\n", args[j].return_code);
exit(EXIT_FAILURE);
}
}
printf("%d: get_config_item (cgroup.devices.devices.allow) returned %d %s\n", __LINE__, ret, v3);
if (!c->clear_config_item(c, "lxc.cgroup")) {
- fprintf(stderr, "%d: failed clearing lxc.cgroup", __LINE__);
+ fprintf(stderr, "%d: failed clearing lxc.cgroup\n", __LINE__);
ret = 1;
goto out;
}
if (!c->clear_config_item(c, "lxc.cap.drop")) {
- fprintf(stderr, "%d: failed clearing lxc.cap.drop", __LINE__);
+ fprintf(stderr, "%d: failed clearing lxc.cap.drop\n", __LINE__);
ret = 1;
goto out;
}
if (!c->clear_config_item(c, "lxc.mount.entries")) {
- fprintf(stderr, "%d: failed clearing lxc.mount.entries", __LINE__);
+ fprintf(stderr, "%d: failed clearing lxc.mount.entries\n", __LINE__);
ret = 1;
goto out;
}
if (!c->clear_config_item(c, "lxc.hook")) {
- fprintf(stderr, "%d: failed clearing lxc.hook", __LINE__);
+ fprintf(stderr, "%d: failed clearing lxc.hook\n", __LINE__);
ret = 1;
goto out;
}
struct lxc_container *c = clist[i];
printf("%-10s Got container struct %s, name %s\n", type, c->name, names[i]);
if (strcmp(c->name, names[i]))
- fprintf(stderr, "ERROR: name mismatch!");
+ fprintf(stderr, "ERROR: name mismatch!\n");
free(names[i]);
lxc_container_put(c);
}