criu 0.0.1.pre → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +2 -0
- data/ext/criu/criu.c +60 -3
- data/ext/criu/extconf.rb +3 -0
- data/ext/criu/ruby-criu.h +6 -0
- data/lib/criu.rb +8 -0
- data/lib/criu/version.rb +1 -1
- metadata +4 -4
- data/ext/criu/criu.h +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c7819b88b5d2942b68599f22e14890efb10572d251f173adab7d879a09324a6
|
4
|
+
data.tar.gz: 283e5f867f14d720ff4c1c546b71eb87c95f29f3fde391f0af45075431c33dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b95ed2c5707523161ce8f8d95cd8e45fcf633d3645692076cf976c964e62310b7cc6c6c1755d4f114778de46fe3ca55f864cc8b012c2ffb97fffe4912f57596
|
7
|
+
data.tar.gz: cf5395378c7b1cd1b4b3f0123539a1ddee59dc94e9d53aa69f37739ca7b2476448bc475905f651356d1bb74a083376bd87b6fe9eaef2ac5fbabdce9f97711e9d
|
data/README.md
CHANGED
data/ext/criu/criu.c
CHANGED
@@ -1,9 +1,66 @@
|
|
1
|
-
#include "criu.h"
|
1
|
+
#include "ruby-criu.h"
|
2
|
+
#include <criu/criu.h>
|
3
|
+
#include <stdio.h>
|
2
4
|
|
3
|
-
VALUE
|
5
|
+
static VALUE
|
6
|
+
rb_criu_init_options (VALUE klass) {
|
7
|
+
if(criu_init_opts() < 0) {
|
8
|
+
rb_raise(rb_eRuntimeError, "criu_init_opts failed");
|
9
|
+
}
|
10
|
+
return Qtrue;
|
11
|
+
}
|
12
|
+
|
13
|
+
static VALUE
|
14
|
+
rb_criu_set_service_address (VALUE klass, VALUE path) {
|
15
|
+
criu_set_service_address(RSTRING_PTR(path));
|
16
|
+
return path;
|
17
|
+
}
|
18
|
+
|
19
|
+
static VALUE
|
20
|
+
rb_criu_set_images_dir_fd (VALUE klass, VALUE fd) {
|
21
|
+
criu_set_images_dir_fd(NUM2INT(fd));
|
22
|
+
return fd;
|
23
|
+
}
|
24
|
+
|
25
|
+
static VALUE
|
26
|
+
rb_criu_set_pid (VALUE klass, VALUE pid) {
|
27
|
+
criu_set_pid(NUM2INT(pid));
|
28
|
+
return pid;
|
29
|
+
}
|
30
|
+
|
31
|
+
static VALUE
|
32
|
+
rb_criu_set_log_level (VALUE klass, VALUE level) {
|
33
|
+
criu_set_log_level(NUM2INT(level));
|
34
|
+
return level;
|
35
|
+
}
|
36
|
+
|
37
|
+
static VALUE
|
38
|
+
rb_criu_set_log_file (VALUE klass, VALUE path) {
|
39
|
+
criu_set_log_file(RSTRING_PTR(path));
|
40
|
+
return path;
|
41
|
+
}
|
42
|
+
|
43
|
+
static VALUE
|
44
|
+
rb_criu_dump (VALUE klass) {
|
45
|
+
if(criu_dump() < 0) {
|
46
|
+
perror("ruby-criu"); /* FIXME: debug... */
|
47
|
+
rb_raise(rb_eRuntimeError, "criu_dump failed");
|
48
|
+
}
|
49
|
+
return Qtrue;
|
50
|
+
}
|
4
51
|
|
5
52
|
void
|
6
53
|
Init_criu(void)
|
7
54
|
{
|
8
|
-
rb_mCriu
|
55
|
+
VALUE rb_mCriu;
|
56
|
+
|
57
|
+
rb_mCriu = rb_define_module("CRIU");
|
58
|
+
rb_define_module_function(rb_mCriu, "_init_options", rb_criu_init_options, 0);
|
59
|
+
rb_define_module_function(rb_mCriu, "service_address=", rb_criu_set_service_address, 1);
|
60
|
+
rb_define_module_function(rb_mCriu, "_set_images_dir_fd", rb_criu_set_images_dir_fd, 1);
|
61
|
+
rb_define_module_function(rb_mCriu, "pid=", rb_criu_set_pid, 1);
|
62
|
+
rb_define_module_function(rb_mCriu, "log_level=", rb_criu_set_log_level, 1);
|
63
|
+
rb_define_module_function(rb_mCriu, "log_file=", rb_criu_set_log_file, 1);
|
64
|
+
|
65
|
+
rb_define_module_function(rb_mCriu, "dump", rb_criu_dump, 0);
|
9
66
|
}
|
data/ext/criu/extconf.rb
CHANGED
data/lib/criu.rb
CHANGED
data/lib/criu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: criu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uchio Kondo
|
@@ -70,8 +70,8 @@ files:
|
|
70
70
|
- bin/setup
|
71
71
|
- criu.gemspec
|
72
72
|
- ext/criu/criu.c
|
73
|
-
- ext/criu/criu.h
|
74
73
|
- ext/criu/extconf.rb
|
74
|
+
- ext/criu/ruby-criu.h
|
75
75
|
- lib/criu.rb
|
76
76
|
- lib/criu/version.rb
|
77
77
|
homepage: https://github.com/udzura/ruby-criu
|
@@ -92,9 +92,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: '0'
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
100
|
rubygems_version: 2.7.6
|