aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 9d34580bbe16dca6146d6237fb9fb5f21f823279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

pub mod linux;
pub mod net;
mod read_dir;
pub mod scoped_path;
pub mod sync;
pub mod syslog;
pub mod vsock;

pub use read_dir::*;

#[macro_export]
macro_rules! syscall {
    ($e:expr) => {{
        let res = $e;
        if res < 0 {
            Err(::std::io::Error::last_os_error())
        } else {
            Ok(res)
        }
    }};
}