Add some missing newlines

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-02-17 20:53:43 -05:00
parent 14a666b577
commit 03fadd1656
No known key found for this signature in database
GPG Key ID: C638974D64792D67
8 changed files with 15 additions and 15 deletions

View File

@ -61,7 +61,7 @@ static void lock_mutex(pthread_mutex_t *l)
int ret; int ret;
if ((ret = pthread_mutex_lock(l)) != 0) { 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); exit(1);
} }
} }
@ -71,7 +71,7 @@ static void unlock_mutex(pthread_mutex_t *l)
int ret; int ret;
if ((ret = pthread_mutex_unlock(l)) != 0) { 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); exit(1);
} }
} }

View File

@ -3132,7 +3132,7 @@ static int write_id_mapping(enum idtype idtype, pid_t pid, const char *buf,
ret = snprintf(path, PATH_MAX, "/proc/%d/%cid_map", pid, idtype == ID_TYPE_UID ? 'u' : 'g'); ret = snprintf(path, PATH_MAX, "/proc/%d/%cid_map", pid, idtype == ID_TYPE_UID ? 'u' : 'g');
if (ret < 0 || ret >= PATH_MAX) { 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; return -E2BIG;
} }
f = fopen(path, "w"); f = fopen(path, "w");

View File

@ -219,7 +219,7 @@ static int instanciate_veth(char *n1, char **n2)
* of a container */ * of a container */
err = setup_private_host_hw_addr(n1); err = setup_private_host_hw_addr(n1);
if (err) { 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)); n1, strerror(-err));
} }
@ -307,7 +307,7 @@ static bool cull_entries(int fd, char *me, char *t, char *br)
nic = alloca(100); nic = alloca(100);
if (fstat(fd, &sb) < 0) { if (fstat(fd, &sb) < 0) {
fprintf(stderr, "Failed to fstat: %s", strerror(errno)); fprintf(stderr, "Failed to fstat: %s\n", strerror(errno));
return false; return false;
} }
len = sb.st_size; len = sb.st_size;
@ -387,7 +387,7 @@ static bool get_nic_if_avail(int fd, char *me, int pid, char *intype, char *br,
return false; return false;
if (fstat(fd, &sb) < 0) { if (fstat(fd, &sb) < 0) {
fprintf(stderr, "Failed to fstat: %s", strerror(errno)); fprintf(stderr, "Failed to fstat: %s\n", strerror(errno));
return false; return false;
} }
len = sb.st_size; len = sb.st_size;

View File

@ -3283,7 +3283,7 @@ struct lxc_container *lxc_container_new(const char *name, const char *configpath
c->config_path = strdup(lxc_global_config_value("lxc.lxcpath")); c->config_path = strdup(lxc_global_config_value("lxc.lxcpath"));
if (!c->config_path) { if (!c->config_path) {
fprintf(stderr, "Out of memory"); fprintf(stderr, "Out of memory\n");
goto err; goto err;
} }

View File

@ -76,7 +76,7 @@ static void lock_mutex(pthread_mutex_t *l)
int ret; int ret;
if ((ret = pthread_mutex_lock(l)) != 0) { 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(); dump_stacktrace();
exit(1); exit(1);
} }
@ -87,7 +87,7 @@ static void unlock_mutex(pthread_mutex_t *l)
int ret; int ret;
if ((ret = pthread_mutex_unlock(l)) != 0) { 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(); dump_stacktrace();
exit(1); exit(1);
} }

View File

@ -224,7 +224,7 @@ int main(int argc, char *argv[]) {
} }
} }
if (args[j].return_code) { 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); exit(EXIT_FAILURE);
} }
} }

View File

@ -281,22 +281,22 @@ int main(int argc, char *argv[])
printf("%d: get_config_item (cgroup.devices.devices.allow) returned %d %s\n", __LINE__, ret, v3); printf("%d: get_config_item (cgroup.devices.devices.allow) returned %d %s\n", __LINE__, ret, v3);
if (!c->clear_config_item(c, "lxc.cgroup")) { 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; ret = 1;
goto out; goto out;
} }
if (!c->clear_config_item(c, "lxc.cap.drop")) { 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; ret = 1;
goto out; goto out;
} }
if (!c->clear_config_item(c, "lxc.mount.entries")) { 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; ret = 1;
goto out; goto out;
} }
if (!c->clear_config_item(c, "lxc.hook")) { 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; ret = 1;
goto out; goto out;
} }

View File

@ -68,7 +68,7 @@ static void test_list_func(const char *lxcpath, const char *type,
struct lxc_container *c = clist[i]; struct lxc_container *c = clist[i];
printf("%-10s Got container struct %s, name %s\n", type, c->name, names[i]); printf("%-10s Got container struct %s, name %s\n", type, c->name, names[i]);
if (strcmp(c->name, names[i])) if (strcmp(c->name, names[i]))
fprintf(stderr, "ERROR: name mismatch!"); fprintf(stderr, "ERROR: name mismatch!\n");
free(names[i]); free(names[i]);
lxc_container_put(c); lxc_container_put(c);
} }