[CRIU] [PATCH 3/3] libcriu: allow user to specify service fd
Pavel Emelyanov
xemul at parallels.com
Thu Jul 16 04:32:48 PDT 2015
> @@ -122,12 +134,21 @@ int criu_dump_iters(int (*more)(criu_predump_info pi));
> */
>
> typedef struct {
> - CriuOpts *rpc; /* Generic RPC options in protobuf format */
> - int (*notify)(char *action, criu_notify_arg_t na);
> + CriuOpts *rpc; /* Generic RPC options in protobuf format */
> + int (*notify)(char *action, criu_notify_arg_t na);
> + enum criu_service_comm service_comm;
> + char *service_address;
> + int service_fd;
3 fields is overkill :) Just put -1 into service_fd if it's not initialized
and NULL in _address and check them.
> } criu_opts;
>
> int criu_local_init_opts(criu_opts **opts);
>
> +void criu_local_set_service_address(criu_opts *opts, char *path);
> +void criu_local_set_service_fd(criu_opts *opts, int fd);
> +void criu_local_set_service_comm(criu_opts *opts, enum criu_service_comm);
> +
> +void criu_local_set_service_fd(criu_opts *opts, int fd);
> +
> void criu_local_set_pid(criu_opts *opts, int pid);
> void criu_local_set_images_dir_fd(criu_opts *opts, int fd); /* must be set for dump/restore */
> void criu_local_set_parent_images(criu_opts *opts, char *path);
>
More information about the CRIU
mailing list