[CRIU] [PATCH 0/3]v2 libcriu

Ruslan Kuprieiev kupruser at gmail.com
Sun Dec 8 16:03:35 PST 2013


On 09.12.2013 01:51, Ruslan Kuprieiev wrote:
> On 07.12.2013 02:48, Ruslan Kuprieiev wrote:
>> Currently we have to ways to use criu: CLI and RPC. This patch adds 
>> one more
>> way -- C API. For now it is just a simple wrapper around RPC, which
>> will help you to avoid writting redundant code when using criu.
>>
>> Ruslan Kuprieiev (3):
>>    makefile: add ldflags-so and rpc.pb-c.o
>>    lib: add check/dump/restore
>>    test: libcriu
>>
>>   Makefile               |   1 +
>>   lib/Makefile           |   4 +-
>>   lib/criu.c             | 283 
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>   lib/criu.h             |  50 +++++++++
>>   scripts/Makefile.build |   2 +-
>>   test/libcriu/Makefile  |  10 ++
>>   test/libcriu/loop.sh   |   4 +
>>   test/libcriu/run.sh    |  63 +++++++++++
>>   test/libcriu/test.c    |  60 +++++++++++
>>   9 files changed, 475 insertions(+), 2 deletions(-)
>>   create mode 100644 lib/criu.h
>>   create mode 100644 test/libcriu/Makefile
>>   create mode 100755 test/libcriu/loop.sh
>>   create mode 100755 test/libcriu/run.sh
>>   create mode 100644 test/libcriu/test.c
>>
> Drop it, please.
> I made it too stupid.
Oops, no, yet take a look at it=).
All those criu_set* functions seems a bit stupid to me, but I still 
can't get how to make it simpler. I don't want to use some structures to 
pass opts from app to lib, because of compatibility. Other thing that I 
thought about is to make criu_set(opt_type, opt_val) function, but this 
require opt_val be a pointer, so I'm not sure that it will be comfy 
enough to use.

Any suggestions, guys?


More information about the CRIU mailing list