Skip to content

Commit

Permalink
Merge pull request #160 from lars-t-hansen/w-152-page_size
Browse files Browse the repository at this point in the history
For #152 - Remove page_size dependency
  • Loading branch information
bast authored Apr 4, 2024
2 parents e0da876 + 813baa9 commit b63ccc7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ chrono = "0.4"
clap = { version = "4.5", features = ["derive"] }
log = "0.4"
env_logger = "0.11"
page_size = "0.6"
libc = "0.2"
signal-hook = "0.3"
serde_json = "1.0.114"
Expand Down
3 changes: 1 addition & 2 deletions src/procfsapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// system to be virtualized. In turn, that allows sensible test cases to be written.

extern crate libc;
extern crate page_size;

use crate::users::get_user_by_uid;

Expand Down Expand Up @@ -86,7 +85,7 @@ impl ProcfsAPI for RealFS {
}

fn page_size_in_kib(&self) -> usize {
page_size::get() / 1024
(unsafe { libc::sysconf(libc::_SC_PAGESIZE) as usize }) / 1024
}

fn now_in_secs_since_epoch(&self) -> u64 {
Expand Down

0 comments on commit b63ccc7

Please sign in to comment.