mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
criu: Several formatting fixes
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
d9ec409b3f
commit
91011328fa
@ -115,8 +115,8 @@ int dedup_one_iovec(struct page_read *pr, struct iovec *iov)
|
||||
unsigned long piov_end;
|
||||
ret = seek_pagemap_page(pr, off, false);
|
||||
if (ret == -1) {
|
||||
if(off < pr->cvaddr) {
|
||||
if(pr->cvaddr < iov_end)
|
||||
if (off < pr->cvaddr) {
|
||||
if (pr->cvaddr < iov_end)
|
||||
off = pr->cvaddr;
|
||||
else
|
||||
return 0;
|
||||
|
@ -1417,7 +1417,7 @@ static int dump_one_task(struct pstree_item *item)
|
||||
}
|
||||
|
||||
ret = parse_posix_timers(pid, &proc_args);
|
||||
if (ret < 0){
|
||||
if (ret < 0) {
|
||||
pr_err("Can't read posix timers file (pid: %d)\n", pid);
|
||||
goto err;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ static int execute_syscall(struct parasite_ctl *ctl,
|
||||
* @<size> -- ret-arg of size <size>
|
||||
*/
|
||||
|
||||
if ((opt[i][0] == '&') || (opt[i][0] == '@')){
|
||||
if ((opt[i][0] == '&') || (opt[i][0] == '@')) {
|
||||
int len;
|
||||
|
||||
if (!r_mem) {
|
||||
|
@ -478,7 +478,7 @@ static int cr_show_pid(int pid)
|
||||
PstreeEntry *pe;
|
||||
|
||||
ret = pb_read_one_eof(fd, &pe, PB_PSTREE);
|
||||
if (ret <= 0){
|
||||
if (ret <= 0) {
|
||||
close(fd);
|
||||
return ret;
|
||||
}
|
||||
|
2
image.c
2
image.c
@ -71,7 +71,7 @@ int write_img_inventory(void)
|
||||
|
||||
crt.state = TASK_ALIVE;
|
||||
crt.pid.real = getpid();
|
||||
if (get_task_ids(&crt)){
|
||||
if (get_task_ids(&crt)) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ static inline void hlist_add_after(struct hlist_node *n,
|
||||
n->next = next;
|
||||
next->pprev = &n->next;
|
||||
|
||||
if(next->next)
|
||||
if (next->next)
|
||||
next->next->pprev = &next->next;
|
||||
}
|
||||
|
||||
|
2
mount.c
2
mount.c
@ -1507,7 +1507,7 @@ int mntns_collect_root(pid_t pid)
|
||||
|
||||
pfd = open_pid_proc(pid);
|
||||
ret = readlinkat(pfd, "root", path, sizeof(path) - 1);
|
||||
if (ret < 0){
|
||||
if (ret < 0) {
|
||||
close_pid_proc();
|
||||
return ret;
|
||||
}
|
||||
|
@ -560,6 +560,7 @@ static int open_page_local_xfer(struct page_xfer *xfer, int fd_type, long id)
|
||||
if (opts.auto_dedup && !opts.use_page_server) {
|
||||
int ret;
|
||||
int pfd;
|
||||
|
||||
pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY);
|
||||
if (pfd < 0 && errno == ENOENT)
|
||||
goto out;
|
||||
|
@ -121,7 +121,7 @@ static int dump_posix_timers(struct parasite_dump_posix_timers_args *args)
|
||||
int i;
|
||||
int ret = 0;
|
||||
|
||||
for(i = 0; i < args->timer_n; i++){
|
||||
for(i = 0; i < args->timer_n; i++) {
|
||||
ret = sys_timer_gettime(args->timer[i].it_id, &args->timer[i].val);
|
||||
if (ret < 0) {
|
||||
pr_err("sys_timer_gettime failed (%d)\n", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user