[CRIU] [PATCH] crtools: add addr string to opts.
Pavel Emelyanov
xemul at parallels.com
Thu Aug 8 16:45:09 EDT 2013
On 08/08/2013 09:34 PM, Ruslan Kuprieiev wrote:
> On 08.08.2013 19:53, Pavel Emelyanov wrote:
>> On 08/08/2013 08:44 PM, Ruslan Kuprieiev wrote:
>>> Hello!
>>>
>>> Added char * addr field to struct cr_options. It will be used as socket
>>> address in cr_service(). addr is properly converted into ps_addr if
>>> "page-server" command is set.
>>>
>>
>> You obviously didn't check this change, as ps_addr thing in your
>> patch if only initialized for page-server action, while can also
>> be used on dump --page-server combination.
>>
>> Thanks,
>> Pavel
> Sorry.
> Here is another one.
>
Another? Or one more? In the former case it's not tested either.
> @@ -235,9 +235,14 @@ int main(int argc, char *argv[])
> opts.use_page_server = true;
> break;
> case 51:
> - if (!inet_aton(optarg, &opts.ps_addr.sin_addr)) {
> - pr_perror("Bad address");
> - return -1;
> + if (opts.use_page_server) {
First of all, options may go in any order. And this
dump --address 127.0.0.1 --page-server
should work.
But that's minor. The major thing is that -- the page-server action now lacks
char -> sockaddr_in conversion.
> + if (!inet_aton(optarg,
> + &opts.ps_addr.sin_addr)) {
> + pr_perror("Bad address");
> + return -1;
> + }
> + } else {
> + opts.addr = strdup(optarg);
> }
> break;
> case 52:
More information about the CRIU
mailing list