summary refs log tree commit diff
path: root/sys_util/src/lib.rs
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2018-03-28 16:23:43 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-29 21:59:44 -0700
commit3afab33a8d797433b6742963ac34e5cf1a57bf64 (patch)
tree717125f89fbe2b41d90318ec847d5e779977dffb /sys_util/src/lib.rs
parent29484502829b98f7ac8b8445f75c3d71dd79dbaf (diff)
downloadcrosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar.gz
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar.bz2
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar.lz
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar.xz
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.tar.zst
crosvm-3afab33a8d797433b6742963ac34e5cf1a57bf64.zip
sys_util: add type to get open file flags
The only instance of libstd getting file flags is the debug formatter
for `File` which would be hacky to depend on. This change adds a type
and method to directly get open file flags.

TEST=cargo test -p sys_util
BUG=chromium:793688

Change-Id: I9fe411d8cb45d2993e2334ffe41f2eb6ec48de70
Reviewed-on: https://chromium-review.googlesource.com/985615
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'sys_util/src/lib.rs')
-rw-r--r--sys_util/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys_util/src/lib.rs b/sys_util/src/lib.rs
index d9c5825..701622b 100644
--- a/sys_util/src/lib.rs
+++ b/sys_util/src/lib.rs
@@ -32,6 +32,7 @@ mod fork;
 mod signalfd;
 mod sock_ctrl_msg;
 mod passwd;
+mod file_flags;
 
 pub use mmap::*;
 pub use shm::*;
@@ -51,6 +52,7 @@ pub use ioctl::*;
 pub use sock_ctrl_msg::*;
 pub use passwd::*;
 pub use poll_token_derive::*;
+pub use file_flags::*;
 
 pub use mmap::Error as MmapError;
 pub use guest_memory::Error as GuestMemoryError;