Tim Zhang
9ec1010a15
Fix clippy warnings
...
Fix clippy warnings.
Signed-off-by: Tim Zhang <tim@hyper.sh >
2021-03-03 13:44:29 +08:00
LiYa'nan
033fa4b857
optimize and refactor: read_to_string and read_i[u]64_from
...
There's so many Duplicated read_string_from method in different
subsystem's implementation, so as read_u64_from/read_i64_from methods.
(1) Move the read_string_from method into `lib.rs`,
called by each subsystem implementation as needed.
(2) Refactor read_u[i]64_from method with the help Rust Generic f
unction `read_from` and wrapped by read_u64_from or read_i64_from.
fix : #20
Signed-off-by: LiYa'nan <oliverliyn@gmail.com >
2020-12-24 09:25:00 +08:00
Tim Zhang
1f188be405
Detect subsystems and get root from /proc/self/mountinfo
...
Delete check_support and stop detecting subsystems by finding in the
root folders because the detecting method is not accurate.
Signed-off-by: Tim Zhang <tim@hyper.sh >
2020-12-17 17:56:46 +08:00
bin liu
152af17f8f
fix build warnings
...
And in Travis CI, treat warnings as error
to keep from merging codes with warning.
Fixes : #13
Signed-off-by: bin liu <bin@hyper.sh >
2020-09-23 16:19:51 +08:00
bin liu
250ada183a
cargo fmt
...
Signed-off-by: bin liu <bin@hyper.sh >
2020-09-09 16:42:55 +08:00
bin liu
86b245076c
add SPDX-License-Identifier for all source
...
Add SPDX-License-Identifier for all existing codes.
Fixes : #2
Signed-off-by: bin liu <bin@hyper.sh >
2020-09-07 20:29:40 +08:00
Levente Kurusa
01a3c22829
Transition to Rust 2018
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-12-23 16:31:05 +01:00
Sam Wilson
c63dad411b
Hide most of the previously undocumented methods in a sealed trait
2018-10-12 09:49:52 +02:00
Sam Wilson
7826b798bd
Implement ::std::error::Error
2018-10-12 09:49:52 +02:00
Hidehito Yabuuchi
2149e1c0c4
Run rustfmt
2018-10-06 18:05:59 +02:00
Hidehito Yabuuchi
5660656e3a
Use self short-hand
2018-10-01 11:56:12 +02:00
Levente Kurusa
0e350463a1
controllers: verify that resource application went ok or not
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-09-14 15:59:29 +02:00
Levente Kurusa
c82a94b58e
tree: add some simple error reporting
...
There's still plenty to wish for.
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-09-03 00:11:33 +02:00
Levente Kurusa
367ea556ca
tests: move tests to tests/ directory and give the user cgroup perms
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-08-30 13:40:15 +02:00
Levente Kurusa
6ef19363be
cpu,cpuacct,cpuset: add first docs
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-08-28 18:41:37 +02:00
Levente Kurusa
9162c5a6ad
Initial work
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-08-28 14:52:23 +02:00