diff options
author | Allen Webb <allenwebb@google.com> | 2019-12-20 16:07:30 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-26 19:58:14 +0000 |
commit | d4afd7033cecd2c90829ad52621b94fb1baf6430 (patch) | |
tree | 8c6a45fe08a882752f4a18e05c290df9363004be /src/linux.rs | |
parent | 691a61992689653b405fa43518c9b28c2a9f1ece (diff) | |
download | crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar.gz crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar.bz2 crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar.lz crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar.xz crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.tar.zst crosvm-d4afd7033cecd2c90829ad52621b94fb1baf6430.zip |
Cast refernces of libc::RLIMIT_NOFILE to i32 for newer libc crate.
BUG=chromium:1021609 TEST=emerge-sand crosvm Change-Id: I9658d3816cc846be2b6320f2f03036375de67cbe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1979532 Tested-by: Allen Webb <allenwebb@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Commit-Queue: Allen Webb <allenwebb@google.com>
Diffstat (limited to 'src/linux.rs')
-rw-r--r-- | src/linux.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux.rs b/src/linux.rs index 62bfd68..dbfad21 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -320,7 +320,7 @@ fn create_base_minijail( // Run in an empty network namespace. j.namespace_net(); // Most devices don't need to open many fds. - j.set_rlimit(libc::RLIMIT_NOFILE, 1024, 1024) + j.set_rlimit(libc::RLIMIT_NOFILE as i32, 1024, 1024) .map_err(Error::SettingMaxOpenFiles)?; // Apply the block device seccomp policy. j.no_new_privs(); @@ -796,7 +796,7 @@ fn create_fs_device( // The file server opens a lot of fds and needs a really high open file limit. let max_open_files = get_max_open_files()?; - j.set_rlimit(libc::RLIMIT_NOFILE, max_open_files, max_open_files) + j.set_rlimit(libc::RLIMIT_NOFILE as i32, max_open_files, max_open_files) .map_err(Error::SettingMaxOpenFiles)?; // TODO(chirantan): Use more than one worker once the kernel driver has been fixed to not panic |