ret = snprintf(log, PATH_MAX, "%s/%s.log", opts->user->directory, opts->action);
if (ret < 0 || ret >= PATH_MAX) {
- ERROR("logfile name too long\n");
+ ERROR("logfile name too long");
return;
}
argv[argc++] = on_path("criu", NULL);
if (!argv[argc-1]) {
- ERROR("Couldn't find criu binary\n");
+ ERROR("Couldn't find criu binary");
goto err;
}
break;
case LXC_NET_MACVLAN:
if (!n->link) {
- ERROR("no host interface for macvlan %s\n", n->name);
+ ERROR("no host interface for macvlan %s", n->name);
goto err;
}
break;
default:
/* we have screened for this earlier... */
- ERROR("unexpected network type %d\n", n->type);
+ ERROR("unexpected network type %d", n->type);
goto err;
}
version_error:
fclose(f);
free(tmp);
- ERROR("must have criu " CRIU_VERSION " or greater to checkpoint/restore\n");
+ ERROR("must have criu " CRIU_VERSION " or greater to checkpoint/restore");
return false;
}
}
return false;
if (geteuid()) {
- ERROR("Must be root to checkpoint\n");
+ ERROR("Must be root to checkpoint");
return false;
}
case LXC_NET_MACVLAN:
break;
default:
- ERROR("Found un-dumpable network: %s (%s)\n", lxc_net_type_to_str(n->type), n->name);
+ ERROR("Found un-dumpable network: %s (%s)", lxc_net_type_to_str(n->type), n->name);
return false;
}
}
buf[n] = 0;
- ERROR("criu process exited %d, output:\n%s\n", WEXITSTATUS(status), buf);
+ ERROR("criu process exited %d, output:\n%s", WEXITSTATUS(status), buf);
goto out_fini_handler;
} else {
ret = snprintf(buf, sizeof(buf), "/proc/self/task/%lu/children", (unsigned long)syscall(__NR_gettid));
FILE *f = fopen(buf, "r");
if (!f) {
- SYSERROR("couldn't read restore's children file %s\n", buf);
+ SYSERROR("couldn't read restore's children file %s", buf);
goto out_fini_handler;
}
}
}
} else {
- ERROR("CRIU was killed with signal %d\n", WTERMSIG(status));
+ ERROR("CRIU was killed with signal %d", WTERMSIG(status));
goto out_fini_handler;
}
if (WIFEXITED(status)) {
if (WEXITSTATUS(status)) {
- ERROR("dump failed with %d\n", WEXITSTATUS(status));
+ ERROR("dump failed with %d", WEXITSTATUS(status));
ret = false;
} else {
ret = true;
}
} else if (WIFSIGNALED(status)) {
- ERROR("dump signaled with %d\n", WTERMSIG(status));
+ ERROR("dump signaled with %d", WTERMSIG(status));
ret = false;
} else {
- ERROR("unknown dump exit %d\n", status);
+ ERROR("unknown dump exit %d", status);
ret = false;
}
return false;
if (access(path, F_OK) == 0) {
- ERROR("please use a fresh directory for the dump directory\n");
+ ERROR("please use a fresh directory for the dump directory");
return false;
}
return false;
if (geteuid()) {
- ERROR("Must be root to restore\n");
+ ERROR("Must be root to restore");
return false;
}