2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

rpc: Add ability to specify veth pairs (--veth-pair option)

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-02-11 23:53:40 +04:00
parent 72bf807cfb
commit 01e88d1c87
5 changed files with 36 additions and 11 deletions

View File

@@ -230,20 +230,15 @@ int main(int argc, char *argv[])
break;
case 47:
{
struct veth_pair *n;
char *aux;
n = xmalloc(sizeof(*n));
if (n == NULL)
return 1;
n->outside = strchr(optarg, '=');
if (n->outside == NULL) {
xfree(n);
aux = strchr(optarg, '=');
if (aux == NULL)
goto bad_arg;
}
*n->outside++ = '\0';
n->inside = optarg;
list_add(&n->node, &opts.veth_pairs);
*aux = '\0';
if (veth_pair_add(optarg, aux + 1))
return 1;
}
break;
case 49: