log: Drop trailing \n from log messages

parent 74f052dd
......@@ -485,11 +485,11 @@ static int dir_create(struct bdev *bdev, const char *dest, const char *n,
}
if (mkdir_p(bdev->src, 0755) < 0) {
ERROR("Error creating %s\n", bdev->src);
ERROR("Error creating %s", bdev->src);
return -1;
}
if (mkdir_p(bdev->dest, 0755) < 0) {
ERROR("Error creating %s\n", bdev->dest);
ERROR("Error creating %s", bdev->dest);
return -1;
}
......@@ -1148,7 +1148,7 @@ static int lvm_create(struct bdev *bdev, const char *dest, const char *n,
return -1;
if (mkdir_p(bdev->dest, 0755) < 0) {
ERROR("Error creating %s\n", bdev->dest);
ERROR("Error creating %s", bdev->dest);
return -1;
}
......@@ -1410,7 +1410,7 @@ static int btrfs_clonepaths(struct bdev *orig, struct bdev *new, const char *old
return btrfs_snapshot(orig->dest, new->dest);
if (rmdir(new->dest) < 0 && errno != -ENOENT) {
SYSERROR("removing %s\n", new->dest);
SYSERROR("removing %s", new->dest);
return -1;
}
......@@ -1540,7 +1540,7 @@ static int loop_mount(struct bdev *bdev)
ffd = open(bdev->src + 5, O_RDWR);
if (ffd < 0) {
SYSERROR("Error opening backing file %s\n", bdev->src);
SYSERROR("Error opening backing file %s", bdev->src);
goto out;
}
......@@ -1551,13 +1551,13 @@ static int loop_mount(struct bdev *bdev)
memset(&lo, 0, sizeof(lo));
lo.lo_flags = LO_FLAGS_AUTOCLEAR;
if (ioctl(lfd, LOOP_SET_STATUS64, &lo) < 0) {
SYSERROR("Error setting autoclear on loop dev\n");
SYSERROR("Error setting autoclear on loop dev");
goto out;
}
ret = mount_unknown_fs(loname, bdev->dest, bdev->mntopts);
if (ret < 0)
ERROR("Error mounting %s\n", bdev->src);
ERROR("Error mounting %s", bdev->src);
else
bdev->lofd = lfd;
......@@ -1724,7 +1724,7 @@ static int loop_create(struct bdev *bdev, const char *dest, const char *n,
return -1;
if (mkdir_p(bdev->dest, 0755) < 0) {
ERROR("Error creating %s\n", bdev->dest);
ERROR("Error creating %s", bdev->dest);
return -1;
}
......@@ -1964,7 +1964,7 @@ static int overlayfs_create(struct bdev *bdev, const char *dest, const char *n,
strcpy(delta+len-6, "delta0");
if (mkdir_p(delta, 0755) < 0) {
ERROR("Error creating %s\n", delta);
ERROR("Error creating %s", delta);
return -1;
}
......@@ -1980,7 +1980,7 @@ static int overlayfs_create(struct bdev *bdev, const char *dest, const char *n,
return -1;
if (mkdir_p(bdev->dest, 0755) < 0) {
ERROR("Error creating %s\n", bdev->dest);
ERROR("Error creating %s", bdev->dest);
return -1;
}
......@@ -2086,11 +2086,11 @@ static int rsync_rootfs(struct rsync_data *data)
// If not a snapshot, copy the fs.
if (orig->ops->mount(orig) < 0) {
ERROR("failed mounting %s onto %s\n", orig->src, orig->dest);
ERROR("failed mounting %s onto %s", orig->src, orig->dest);
return -1;
}
if (new->ops->mount(new) < 0) {
ERROR("failed mounting %s onto %s\n", new->src, new->dest);
ERROR("failed mounting %s onto %s", new->src, new->dest);
return -1;
}
if (setgid(0) < 0) {
......@@ -2104,7 +2104,7 @@ static int rsync_rootfs(struct rsync_data *data)
return -1;
}
if (do_rsync(orig->dest, new->dest) < 0) {
ERROR("rsyncing %s to %s\n", orig->src, new->src);
ERROR("rsyncing %s to %s", orig->src, new->src);
return -1;
}
......@@ -2147,7 +2147,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
orig = bdev_init(src, NULL, NULL);
if (!orig) {
ERROR("failed to detect blockdev type for %s\n", src);
ERROR("failed to detect blockdev type for %s", src);
return NULL;
}
......@@ -2214,7 +2214,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
}
if (new->ops->clone_paths(orig, new, oldname, cname, oldpath, lxcpath, snap, newsize) < 0) {
ERROR("failed getting pathnames for cloned storage: %s\n", src);
ERROR("failed getting pathnames for cloned storage: %s", src);
bdev_put(orig);
bdev_put(new);
return NULL;
......
......@@ -117,7 +117,7 @@ int lxc_caps_up(void)
ret = cap_get_flag(caps, cap, CAP_PERMITTED, &flag);
if (ret) {
if (errno == EINVAL) {
INFO("Last supported cap was %d\n", cap-1);
INFO("Last supported cap was %d", cap-1);
break;
} else {
ERROR("failed to cap_get_flag: %m");
......
......@@ -1866,7 +1866,7 @@ static int do_setup_cgroup_limits(struct cgfs_data *d,
cgroup_devices_has_allow_or_deny(d, cg->value, true))
continue;
if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) {
ERROR("Error setting %s to %s for %s\n",
ERROR("Error setting %s to %s for %s",
cg->subsystem, cg->value, d->name);
goto out;
}
......
......@@ -746,7 +746,7 @@ static bool cgm_setup_limits(void *hdata, struct lxc_list *cgroup_settings, bool
*p = '\0';
if (cgm_do_set(controller, cg->subsystem, d->cgroup_path
, cg->value) < 0) {
ERROR("Error setting %s to %s for %s\n",
ERROR("Error setting %s to %s for %s",
cg->subsystem, cg->value, d->name);
goto out;
}
......
......@@ -841,14 +841,14 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
}
ret = creat(lxcpath, 0660);
if (ret==-1 && errno != EEXIST) {
SYSERROR("error creating %s\n", lxcpath);
SYSERROR("error creating %s", lxcpath);
return -1;
}
if (ret >= 0)
close(ret);
ret = unlink(path);
if (ret && errno != ENOENT) {
SYSERROR("error unlinking %s\n", path);
SYSERROR("error unlinking %s", path);
return -1;
}
......@@ -865,7 +865,7 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
}
ret = symlink(lxcpath, path);
if (ret) {
SYSERROR("failed to create symlink for tty %d\n", i+1);
SYSERROR("failed to create symlink for tty %d", i+1);
return -1;
}
} else {
......@@ -873,7 +873,7 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
if (access(path, F_OK)) {
ret = creat(path, 0660);
if (ret==-1) {
SYSERROR("error creating %s\n", path);
SYSERROR("error creating %s", path);
/* this isn't fatal, continue */
} else {
close(ret);
......@@ -1142,7 +1142,7 @@ static int mount_check_fs( const char *dir, char *fstype )
int found_fs = 0;
char *p2;
DEBUG("entering mount_check_fs for %s\n", dir);
DEBUG("entering mount_check_fs for %s", dir);
if ( 0 != access(dir, F_OK) || 0 != stat(dir, &s) || 0 == S_ISDIR(s.st_mode) ) {
return 0;
......@@ -1184,7 +1184,7 @@ static int mount_check_fs( const char *dir, char *fstype )
fclose(f);
DEBUG("mount_check_fs returning %d last %s\n", found_fs, fstype);
DEBUG("mount_check_fs returning %d last %s", found_fs, fstype);
return found_fs;
}
......@@ -1313,7 +1313,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath)
char host_path[MAXPATHLEN];
char devtmpfs_path[MAXPATHLEN];
INFO("Mounting /dev under %s\n", root);
INFO("Mounting /dev under %s", root);
ret = snprintf(host_path, MAXPATHLEN, "%s/%s/rootfs.dev", lxcpath, name);
if (ret < 0 || ret > MAXPATHLEN)
......@@ -1337,7 +1337,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath)
ret = symlink(devtmpfs_path, host_path);
if ( ret < 0 ) {
SYSERROR("WARNING: Failed to create symlink '%s'->'%s'\n", host_path, devtmpfs_path);
SYSERROR("WARNING: Failed to create symlink '%s'->'%s'", host_path, devtmpfs_path);
}
DEBUG("Bind mounting %s to %s", devtmpfs_path , path );
ret = mount(devtmpfs_path, path, NULL, MS_BIND, 0 );
......@@ -1353,7 +1353,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath)
}
}
if (ret) {
SYSERROR("Failed to mount /dev at %s\n", root);
SYSERROR("Failed to mount /dev at %s", root);
return -1;
}
ret = snprintf(path, MAXPATHLEN, "%s/dev/pts", root);
......@@ -1371,7 +1371,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath)
}
}
INFO("Mounted /dev under %s\n", root);
INFO("Mounted /dev under %s", root);
return 0;
}
......@@ -1399,7 +1399,7 @@ static int setup_autodev(const char *root)
int i;
mode_t cmask;
INFO("Creating initial consoles under %s/dev\n", root);
INFO("Creating initial consoles under %s/dev", root);
ret = snprintf(path, MAXPATHLEN, "%s/dev", root);
if (ret < 0 || ret >= MAXPATHLEN) {
......@@ -1407,7 +1407,7 @@ static int setup_autodev(const char *root)
return -1;
}
INFO("Populating /dev under %s\n", root);
INFO("Populating /dev under %s", root);
cmask = umask(S_IXUSR | S_IXGRP | S_IXOTH);
for (i = 0; i < sizeof(lxc_devs) / sizeof(lxc_devs[0]); i++) {
const struct lxc_devs *d = &lxc_devs[i];
......@@ -1416,13 +1416,13 @@ static int setup_autodev(const char *root)
return -1;
ret = mknod(path, d->mode, makedev(d->maj, d->min));
if (ret && errno != EEXIST) {
SYSERROR("Error creating %s\n", d->name);
SYSERROR("Error creating %s", d->name);
return -1;
}
}
umask(cmask);
INFO("Populated /dev under %s\n", root);
INFO("Populated /dev under %s", root);
return 0;
}
......@@ -1524,7 +1524,7 @@ static int chroot_into_slave(struct lxc_conf *conf)
SYSERROR("Failed to chroot into tmp-/");
return -1;
}
INFO("Chrooted into tmp-/ at %s\n", path);
INFO("Chrooted into tmp-/ at %s", path);
return 0;
}
......@@ -1651,7 +1651,7 @@ static int setup_dev_console(const struct lxc_rootfs *rootfs,
ret = snprintf(path, sizeof(path), "%s/dev/console", rootfs->mount);
if (ret >= sizeof(path)) {
ERROR("console path too long\n");
ERROR("console path too long");
return -1;
}
......@@ -1699,28 +1699,28 @@ static int setup_ttydir_console(const struct lxc_rootfs *rootfs,
return -1;
ret = mkdir(path, 0755);
if (ret && errno != EEXIST) {
SYSERROR("failed with errno %d to create %s\n", errno, path);
SYSERROR("failed with errno %d to create %s", errno, path);
return -1;
}
INFO("created %s\n", path);
INFO("created %s", path);
ret = snprintf(lxcpath, sizeof(lxcpath), "%s/dev/%s/console",
rootfs->mount, ttydir);
if (ret >= sizeof(lxcpath)) {
ERROR("console path too long\n");
ERROR("console path too long");
return -1;
}
snprintf(path, sizeof(path), "%s/dev/console", rootfs->mount);
ret = unlink(path);
if (ret && errno != ENOENT) {
SYSERROR("error unlinking %s\n", path);
SYSERROR("error unlinking %s", path);
return -1;
}
ret = creat(lxcpath, 0660);
if (ret==-1 && errno != EEXIST) {
SYSERROR("error %d creating %s\n", errno, lxcpath);
SYSERROR("error %d creating %s", errno, lxcpath);
return -1;
}
if (ret >= 0)
......@@ -1780,7 +1780,7 @@ static int setup_kmsg(const struct lxc_rootfs *rootfs,
ret = unlink(kpath);
if (ret && errno != ENOENT) {
SYSERROR("error unlinking %s\n", kpath);
SYSERROR("error unlinking %s", kpath);
return -1;
}
......@@ -2212,7 +2212,7 @@ static int dropcaps_except(struct lxc_list *caps)
char *ptr;
int i, capid;
int numcaps = lxc_caps_last_cap() + 1;
INFO("found %d capabilities\n", numcaps);
INFO("found %d capabilities", numcaps);
if (numcaps <= 0 || numcaps > 200)
return -1;
......@@ -2557,7 +2557,7 @@ void lxc_rename_phys_nics_on_shutdown(struct lxc_conf *conf)
INFO("running to reset %d nic names", conf->num_savednics);
for (i=0; i<conf->num_savednics; i++) {
struct saved_nic *s = &conf->saved_nics[i];
INFO("resetting nic %d to %s\n", s->ifindex, s->orig_name);
INFO("resetting nic %d to %s", s->ifindex, s->orig_name);
lxc_netdev_rename_by_index(s->ifindex, s->orig_name);
free(s->orig_name);
}
......@@ -3451,7 +3451,7 @@ static int check_autodev( const char *rootfs, void *data )
if( arg && arg->argv[0] ) {
command = arg->argv[0];
DEBUG("Set exec command to %s\n", command );
DEBUG("Set exec command to %s", command );
}
strncpy( path, command, MAXPATHLEN-1 );
......@@ -3619,7 +3619,7 @@ int lxc_setup(struct lxc_handler *handler)
return -1;
}
if (dropcaps_except(&lxc_conf->keepcaps)) {
ERROR("failed to keep requested caps\n");
ERROR("failed to keep requested caps");
return -1;
}
} else if (setup_caps(&lxc_conf->caps)) {
......
......@@ -76,7 +76,7 @@ static char *apparmor_process_label_get(pid_t pid)
again:
f = fopen(path, "r");
if (!f) {
SYSERROR("opening %s\n", path);
SYSERROR("opening %s", path);
if (buf)
free(buf);
return NULL;
......@@ -94,7 +94,7 @@ again:
ret = fread(buf, 1, sz - 1, f);
fclose(f);
if (ret < 0) {
ERROR("reading %s\n", path);
ERROR("reading %s", path);
free(buf);
return NULL;
}
......
......@@ -56,7 +56,7 @@ static int do_snapshot(struct lxc_container *c)
return -1;
}
INFO("Created snapshot snap%d\n", ret);
INFO("Created snapshot snap%d", ret);
return 0;
}
......
......@@ -743,7 +743,7 @@ static bool create_container_dir(struct lxc_container *c)
if (errno == EEXIST)
ret = 0;
else
SYSERROR("failed to create container path for %s\n", c->name);
SYSERROR("failed to create container path for %s", c->name);
}
free(s);
return ret == 0;
......@@ -781,7 +781,7 @@ static struct bdev *do_bdev_create(struct lxc_container *c, const char *type,
bdev = bdev_create(dest, type, c->name, specs);
if (!bdev) {
ERROR("Failed to create backing store type %s\n", type);
ERROR("Failed to create backing store type %s", type);
return NULL;
}
......@@ -792,7 +792,7 @@ static struct bdev *do_bdev_create(struct lxc_container *c, const char *type,
if (geteuid() != 0) {
if (chown_mapped_root(bdev->dest, c->lxc_conf) < 0) {
ERROR("Error chowning %s to container root\n", bdev->dest);
ERROR("Error chowning %s to container root", bdev->dest);
bdev_put(bdev);
return NULL;
}
......@@ -827,7 +827,7 @@ static char *get_template_path(const char *t)
return NULL;
}
if (access(tpath, X_OK) < 0) {
SYSERROR("bad template: %s\n", t);
SYSERROR("bad template: %s", t);
free(tpath);
return NULL;
}
......@@ -853,7 +853,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool quiet
pid = fork();
if (pid < 0) {
SYSERROR("failed to fork task for container creation template\n");
SYSERROR("failed to fork task for container creation template");
return false;
}
......@@ -1083,7 +1083,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool quiet
}
if (wait_for_pid(pid) != 0) {
ERROR("container creation template for %s failed\n", c->name);
ERROR("container creation template for %s failed", c->name);
return false;
}
......@@ -1126,7 +1126,7 @@ static bool prepend_lxc_header(char *path, const char *t, char *const argv[])
#if HAVE_LIBGNUTLS
tpath = get_template_path(t);
if (!tpath) {
ERROR("bad template: %s\n", t);
ERROR("bad template: %s", t);
goto out_free_contents;
}
......@@ -1222,7 +1222,7 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
if (t) {
tpath = get_template_path(t);
if (!tpath) {
ERROR("bad template: %s\n", t);
ERROR("bad template: %s", t);
goto out;
}
}
......@@ -1241,7 +1241,7 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
if (!c->lxc_conf) {
if (!c->load_config(c, lxc_global_config_value("lxc.default_config"))) {
ERROR("Error loading default configuration file %s\n", lxc_global_config_value("lxc.default_config"));
ERROR("Error loading default configuration file %s", lxc_global_config_value("lxc.default_config"));
goto free_tpath;
}
}
......@@ -1282,7 +1282,7 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
*/
pid = fork();
if (pid < 0) {
SYSERROR("failed to fork task for container creation template\n");
SYSERROR("failed to fork task for container creation template");
goto out_unlock;
}
......@@ -1297,7 +1297,7 @@ static bool lxcapi_create(struct lxc_container *c, const char *t,
/* save config file again to store the new rootfs location */
if (!c->save_config(c, NULL)) {
ERROR("failed to save starting configuration for %s\n", c->name);
ERROR("failed to save starting configuration for %s", c->name);
// parent task won't see bdev in config so we delete it
bdev->ops->umount(bdev);
bdev->ops->destroy(bdev);
......@@ -1558,7 +1558,7 @@ static char** lxcapi_get_interfaces(struct lxc_container *c)
pid = fork();
if (pid < 0) {
SYSERROR("failed to fork task to get interfaces information\n");
SYSERROR("failed to fork task to get interfaces information");
close(pipefd[0]);
close(pipefd[1]);
return NULL;
......@@ -1645,7 +1645,7 @@ static char** lxcapi_get_ips(struct lxc_container *c, const char* interface, con
pid = fork();
if (pid < 0) {
SYSERROR("failed to fork task to get container ips\n");
SYSERROR("failed to fork task to get container ips");
close(pipefd[0]);
close(pipefd[1]);
return NULL;
......@@ -1808,7 +1808,7 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
// If we haven't yet loaded a config, load the stock config
if (!c->lxc_conf) {
if (!c->load_config(c, lxc_global_config_value("lxc.default_config"))) {
ERROR("Error loading default configuration file %s while saving %s\n", lxc_global_config_value("lxc.default_config"), c->name);
ERROR("Error loading default configuration file %s while saving %s", lxc_global_config_value("lxc.default_config"), c->name);
return false;
}
}
......@@ -1919,7 +1919,7 @@ static void mod_all_rdeps(struct lxc_container *c, bool inc)
return;
while (getline(&lxcpath, &pathlen, f) != -1) {
if (getline(&lxcname, &namelen, f) == -1) {
ERROR("badly formatted file %s\n", path);
ERROR("badly formatted file %s", path);
goto out;
}
strip_newline(lxcpath);
......@@ -2522,7 +2522,7 @@ static int clone_update_rootfs(struct clone_update_data *data)
if (!file_exists(path))
return 0;
if (!(fout = fopen(path, "w"))) {
SYSERROR("unable to open %s: ignoring\n", path);
SYSERROR("unable to open %s: ignoring", path);
return 0;
}
if (fprintf(fout, "%s", c->name) < 0) {
......@@ -2563,7 +2563,7 @@ static int create_file_dirname(char *path)
*p = '\0';
ret = mkdir(path, 0755);
if (ret && errno != EEXIST)
SYSERROR("creating container path %s\n", path);
SYSERROR("creating container path %s", path);
*p = '/';
return ret;
}
......@@ -2628,7 +2628,7 @@ static struct lxc_container *lxcapi_clone(struct lxc_container *c, const char *n
if (am_unpriv()) {
if (chown_mapped_root(newpath, c->lxc_conf) < 0) {
ERROR("Error chowning %s to container root\n", newpath);
ERROR("Error chowning %s to container root", newpath);
goto out;
}
}
......@@ -2814,7 +2814,7 @@ static int lxcapi_snapshot(struct lxc_container *c, const char *commentfile)
LXC_CLONE_KEEPBDEVTYPE | LXC_CLONE_MAYBE_SNAPSHOT;
c2 = c->clone(c, newname, snappath, flags, NULL, NULL, 0, NULL);
if (!c2) {
ERROR("clone of %s:%s failed\n", c->config_path, c->name);
ERROR("clone of %s:%s failed", c->config_path, c->name);
return -1;
}
......@@ -2835,7 +2835,7 @@ static int lxcapi_snapshot(struct lxc_container *c, const char *commentfile)
sprintf(dfnam, "%s/%s/ts", snappath, newname);
f = fopen(dfnam, "w");
if (!f) {
ERROR("Failed to open %s\n", dfnam);
ERROR("Failed to open %s", dfnam);
return -1;
}
if (fprintf(f, "%s", buffer) < 0) {
......
......@@ -76,7 +76,7 @@ static int parse_config(FILE *f, struct lxc_conf *conf)
#endif
SCMP_ACT_ALLOW, nr, 0);
if (ret < 0) {
ERROR("failed loading allow rule for %d\n", nr);
ERROR("failed loading allow rule for %d", nr);
return ret;
}
}
......@@ -110,13 +110,13 @@ int lxc_read_seccomp_config(struct lxc_conf *conf)
conf->seccomp_ctx,
#endif
SCMP_FLTATR_CTL_NNP, 0)) {
ERROR("failed to turn off n-new-privs\n");
ERROR("failed to turn off n-new-privs");
return -1;
}
f = fopen(conf->seccomp, "r");
if (!f) {
SYSERROR("failed to open seccomp policy file %s\n", conf->seccomp);
SYSERROR("failed to open seccomp policy file %s", conf->seccomp);
return -1;
}
ret = parse_config(f, conf);
......
......@@ -317,7 +317,7 @@ static int lxc_poll(const char *name, struct lxc_handler *handler)
goto out_mainloop_open;
}
#else
DEBUG("not starting utmp handler as cap_sys_boot cannot be dropped without capabilities support\n");
DEBUG("not starting utmp handler as cap_sys_boot cannot be dropped without capabilities support");
#endif
}
......@@ -518,19 +518,19 @@ static int must_drop_cap_sys_boot(struct lxc_conf *conf)
flags |= CLONE_NEWUSER;
#ifdef __ia64__
pid = __clone2(container_reboot_supported, stack, stack_size, flags, &cmd);
pid = __clone2(container_reboot_supported, stack, stack_size, flags, &cmd);
#else
stack += stack_size;
pid = clone(container_reboot_supported, stack, flags, &cmd);
stack += stack_size;
pid = clone(container_reboot_supported, stack, flags, &cmd);
#endif
if (pid < 0) {
SYSERROR("failed to clone\n");
return -1;
}
if (wait(&status) < 0) {
SYSERROR("unexpected wait error: %m\n");
return -1;
}
if (pid < 0) {
SYSERROR("failed to clone");
return -1;
}
if (wait(&status) < 0) {
SYSERROR("unexpected wait error: %m");
return -1;
}
if (WEXITSTATUS(status) != 1)
return 1;
......@@ -598,7 +598,7 @@ static int do_start(void *data)
SYSERROR("failed to remove CAP_SYS_BOOT capability");
goto out_warn_father;
}
DEBUG("Dropped cap_sys_boot\n");
DEBUG("Dropped cap_sys_boot");
}
#endif
......@@ -678,7 +678,7 @@ static int save_phys_nics(struct lxc_conf *conf)
SYSERROR("failed to allocate memory");
return -1;
}
INFO("stored saved_nic #%d idx %d name %s\n", conf->num_savednics,
INFO("stored saved_nic #%d idx %d name %s", conf->num_savednics,
conf->saved_nics[conf->num_savednics].ifindex,
conf->saved_nics[conf->num_savednics].orig_name);
conf->num_savednics++;
......@@ -900,12 +900,12 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
if (must_drop_cap_sys_boot(handler->conf)) {
#if HAVE_SYS_CAPABILITY_H
DEBUG("Dropping cap_sys_boot\n");
DEBUG("Dropping cap_sys_boot");
#else
DEBUG("Can't drop cap_sys_boot as capabilities aren't supported\n");
DEBUG("Can't drop cap_sys_boot as capabilities aren't supported");
#endif
} else {
DEBUG("Not dropping cap_sys_boot or watching utmp\n");
DEBUG("Not dropping cap_sys_boot or watching utmp");
handler->conf->need_utmp_watch = 0;
}
......@@ -940,7 +940,7 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
handler->conf->reboot = 1;
break;
default:
DEBUG("unknown exit status for init: %d\n", WTERMSIG(status));
DEBUG("unknown exit status for init: %d", WTERMSIG(status));
break;
}
}
......
......@@ -192,7 +192,7 @@ extern int mkdir_p(const char *dir, mode_t mode)
makeme = strndup(orig, dir - orig);
if (*makeme) {
if (mkdir(makeme, mode) && errno != EEXIST) {
SYSERROR("failed to create directory '%s'\n", makeme);
SYSERROR("failed to create directory '%s'", makeme);
free(makeme);
return -1;
}
......
......@@ -68,7 +68,7 @@ static void test_list_func(const char *lxcpath, const char *type,
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!\n");
fprintf(stderr, "ERROR: name mismatch!");
free(names[i]);
lxc_container_put(c);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment