Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 2018 + failure → anyhow + misc fixes #16

Merged
merged 7 commits into from
Jun 6, 2020

Conversation

ignatenkobrain
Copy link
Member

Based on top of #12

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
TODO Show resolved Hide resolved
@@ -202,6 +202,7 @@ After={service}

[Swap]
What={root}dev/{zram_device}
Options=pri=100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Priority=100 instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now see #12 (comment). So maybe let's leave this with Options= for now, and figure out why Priority does now work later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll test this on my laptop today and check what's the problem.

Cargo.lock Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
nabijaczleweli and others added 7 commits June 6, 2020 13:53
Examples:

nabijaczleweli@nabtop:~/code/zram-generator$ find test.root/ -type f
test.root/etc/systemd/zram-generator.conf
test.root/proc/meminfo

nabijaczleweli@nabtop:~/code/zram-generator$ ZRAM_GENERATOR_ROOT=test.root ./target/debug/zram-generator test.out
Using "test.root/" as root directory
Found configuration for zram0: memory-limit=9048MB zram-fraction=0.1
Creating swap-create@zram0.service for test.root/dev/zram0 (380MB)

nabijaczleweli@nabtop:~/code/zram-generator$ find test.root/ -type f
test.root/etc/systemd/zram-generator.conf
test.root/proc/meminfo
test.root/run/modules-load.d/zram.conf

nabijaczleweli@nabtop:~/code/zram-generator$ find test.out/ \( -type f -o -type l \)
test.out/swap-create@zram0.service
test.out/swap.target.wants/dev-zram0.swap
test.out/dev-zram0.swap
This is the default for zram swaps in the Debian zram-tools package

Ref: systemd#8
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
As well as to the Rust 2018.

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
I am not sure if return codes are used for anything though.

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants