1 // Copyright 2018 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #![cfg(unix)] 6 7 extern crate libc; 8 9 #[macro_use] 10 extern crate p9_wire_format_derive; 11 12 mod protocol; 13 mod server; 14 15 pub mod fuzzing; 16 17 pub use server::*; 18 19 #[macro_export] 20 macro_rules! syscall { 21 ($e:expr) => {{ 22 let res = $e; 23 if res < 0 { 24 Err(std::io::Error::last_os_error()) 25 } else { 26 Ok(res) 27 } 28 }}; 29 } 30