[CRIU] [PATCH 1/4] crtools: preload libraries

Pavel Emelyanov xemul at parallels.com
Mon Dec 2 02:25:36 PST 2013


> @@ -129,6 +162,7 @@ int main(int argc, char *argv[])
>  			{ "prev-images-dir", required_argument, 0, 53},
>  			{ "ms", no_argument, 0, 54},
>  			{ "track-mem", no_argument, 0, 55},
> +			{ "lib", required_argument, 0, 56},
>  			{ },
>  		};
>  
> @@ -271,6 +305,9 @@ int main(int argc, char *argv[])
>  		case 54:
>  			opts.check_ms_kernel = true;
>  			break;
> +		case 56:
> +			cr_lib_add(optarg);
> +			break;
>  		case 'V':
>  			pr_msg("Version: %s\n", CRIU_VERSION);
>  			if (strcmp(CRIU_GITID, "0"))

I doubt linking libraries via cmdline is good idea. How about
if criu scans some directory (see below) and hooks in any .so
file found in it. Each .so should have a defined header that
describes what this .so is about to do. Right now we have only
one "type" of them -- help with unix sockets.

The directory to scan is one of (in descending prio)

1) -L option
2) CRIU_LIBS_DIR environment
3) pre-defined constant like CR_DEFAULT_SERVICE_ADDRESS

Thanks,
Pavel


More information about the CRIU mailing list