mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
parasite: Simplify parasite command copying
No need for memcpy here, it's plain integer value which need to be filled. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
9929d2efdf
commit
aead1e26d6
@ -17,7 +17,7 @@ struct parasite_ctl {
|
||||
|
||||
int signals_blocked;
|
||||
|
||||
void * addr_cmd; /* addr for command */
|
||||
unsigned int * addr_cmd; /* addr for command */
|
||||
void * addr_args; /* address for arguments */
|
||||
int tsock; /* transport socket for transfering fds */
|
||||
};
|
||||
|
@ -244,7 +244,7 @@ static int parasite_execute_by_pid(unsigned int cmd, struct parasite_ctl *ctl, p
|
||||
regs = regs_orig;
|
||||
}
|
||||
|
||||
memcpy(ctl->addr_cmd, &cmd, sizeof(cmd));
|
||||
*ctl->addr_cmd = cmd;
|
||||
|
||||
parasite_setup_regs(ctl->parasite_ip, ®s);
|
||||
|
||||
@ -807,7 +807,7 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct list_head *vma_are
|
||||
|
||||
/* Setup the rest of a control block */
|
||||
ctl->parasite_ip = PARASITE_HEAD_ADDR((unsigned long)ctl->remote_map);
|
||||
ctl->addr_cmd = (void *)PARASITE_CMD_ADDR((unsigned long)ctl->local_map);
|
||||
ctl->addr_cmd = (unsigned int *)PARASITE_CMD_ADDR((unsigned long)ctl->local_map);
|
||||
ctl->addr_args = (void *)PARASITE_ARGS_ADDR((unsigned long)ctl->local_map);
|
||||
|
||||
ret = parasite_init(ctl, pid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user