Commit f81d69da authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

infect: Remove types.h from infect.h

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f3021b6a
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/un.h> #include <sys/un.h>
#include <stdint.h>
struct parasite_ctl; struct parasite_ctl;
extern int compel_rpc_sync(unsigned int cmd, struct parasite_ctl *ctl); extern int compel_rpc_sync(unsigned int cmd, struct parasite_ctl *ctl);
...@@ -11,9 +12,9 @@ extern int compel_rpc_call_sync(unsigned int cmd, struct parasite_ctl *ctl); ...@@ -11,9 +12,9 @@ extern int compel_rpc_call_sync(unsigned int cmd, struct parasite_ctl *ctl);
extern int compel_rpc_sock(struct parasite_ctl *ctl); extern int compel_rpc_sock(struct parasite_ctl *ctl);
struct ctl_msg { struct ctl_msg {
unsigned int cmd; /* command itself */ uint32_t cmd; /* command itself */
unsigned int ack; /* ack on command */ uint32_t ack; /* ack on command */
int err; /* error code on reply */ int32_t err; /* error code on reply */
}; };
#define ctl_msg_cmd(_cmd) \ #define ctl_msg_cmd(_cmd) \
...@@ -43,20 +44,17 @@ enum { ...@@ -43,20 +44,17 @@ enum {
}; };
struct parasite_init_args { struct parasite_init_args {
int h_addr_len; int32_t h_addr_len;
struct sockaddr_un h_addr; struct sockaddr_un h_addr;
int32_t log_level;
int log_level; uint64_t sigreturn_addr;
uint64_t sigframe; /* pointer to sigframe */
u64 sigframe; /* pointer to sigframe */ futex_t daemon_connected;
void *sigreturn_addr;
futex_t daemon_connected;
}; };
struct parasite_unmap_args { struct parasite_unmap_args {
void *parasite_start; uint64_t parasite_start;
unsigned long parasite_len; uint64_t parasite_len;
}; };
......
#ifndef __COMPEL_INFECT_H__ #ifndef __COMPEL_INFECT_H__
#define __COMPEL_INFECT_H__ #define __COMPEL_INFECT_H__
#include "types.h" #include "asm/infect-types.h"
#include "compel/include/uapi/ksigset.h" #include "compel/include/uapi/ksigset.h"
#define PARASITE_START_AREA_MIN (4096) #define PARASITE_START_AREA_MIN (4096)
......
...@@ -585,7 +585,7 @@ static int parasite_init_daemon(struct parasite_ctl *ctl) ...@@ -585,7 +585,7 @@ static int parasite_init_daemon(struct parasite_ctl *ctl)
goto err; goto err;
} }
ctl->sigreturn_addr = args->sigreturn_addr; ctl->sigreturn_addr = (void*)(uintptr_t)args->sigreturn_addr;
ctl->daemonized = true; ctl->daemonized = true;
pr_info("Parasite %d has been switched to daemon mode\n", pid); pr_info("Parasite %d has been switched to daemon mode\n", pid);
return 0; return 0;
......
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