fdio/
fdio_sys.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Generated by src/lib/fdio/rust/bindgen.sh using bindgen 0.71.1
6
7#![allow(dead_code)]
8#![allow(non_camel_case_types)]
9#![allow(non_snake_case)]
10#![allow(unused_results)]
11
12pub const FDIO_MAX_FD: u32 = 1024;
13pub const FDIO_CHUNK_SIZE: u32 = 8192;
14pub const FDIO_MAX_FILENAME: u32 = 255;
15pub const FDIO_FLAG_USE_FOR_STDIO: u32 = 32768;
16pub const FDIO_EVT_READABLE: u32 = 1;
17pub const FDIO_EVT_WRITABLE: u32 = 4;
18pub const FDIO_EVT_ERROR: u32 = 8;
19pub const FDIO_SPAWN_CLONE_JOB: u32 = 1;
20pub const FDIO_SPAWN_DEFAULT_LDSVC: u32 = 2;
21pub const FDIO_SPAWN_CLONE_NAMESPACE: u32 = 4;
22pub const FDIO_SPAWN_CLONE_STDIO: u32 = 8;
23pub const FDIO_SPAWN_CLONE_ENVIRON: u32 = 16;
24pub const FDIO_SPAWN_CLONE_UTC_CLOCK: u32 = 32;
25pub const FDIO_SPAWN_CLONE_ALL: u32 = 65535;
26pub const FDIO_SPAWN_ACTION_CLONE_FD: u32 = 1;
27pub const FDIO_SPAWN_ACTION_TRANSFER_FD: u32 = 2;
28pub const FDIO_SPAWN_ACTION_ADD_NS_ENTRY: u32 = 3;
29pub const FDIO_SPAWN_ACTION_ADD_HANDLE: u32 = 4;
30pub const FDIO_SPAWN_ACTION_SET_NAME: u32 = 5;
31pub const FDIO_SPAWN_ACTION_CLONE_DIR: u32 = 6;
32pub const FDIO_SPAWN_ERR_MSG_MAX_LENGTH: u32 = 1024;
33pub type zx_time_t = i64;
34pub type zx_handle_t = u32;
35pub type zx_status_t = i32;
36pub type zx_signals_t = u32;
37unsafe extern "C" {
38    pub fn fdio_fd_create(handle: zx_handle_t, fd_out: *mut ::std::os::raw::c_int) -> zx_status_t;
39}
40unsafe extern "C" {
41    pub fn fdio_cwd_clone(out_handle: *mut zx_handle_t) -> zx_status_t;
42}
43unsafe extern "C" {
44    pub fn fdio_fd_clone(fd: ::std::os::raw::c_int, out_handle: *mut zx_handle_t) -> zx_status_t;
45}
46unsafe extern "C" {
47    pub fn fdio_fd_transfer(fd: ::std::os::raw::c_int, out_handle: *mut zx_handle_t)
48        -> zx_status_t;
49}
50unsafe extern "C" {
51    pub fn fdio_fd_transfer_or_clone(
52        fd: ::std::os::raw::c_int,
53        out_handle: *mut zx_handle_t,
54    ) -> zx_status_t;
55}
56#[repr(C)]
57#[derive(Debug, Copy, Clone)]
58pub struct fdio {
59    _unused: [u8; 0],
60}
61pub type fdio_t = fdio;
62unsafe extern "C" {
63    pub fn fdio_create(handle: zx_handle_t, out_io: *mut *mut fdio_t) -> zx_status_t;
64}
65unsafe extern "C" {
66    pub fn fdio_default_create() -> *mut fdio_t;
67}
68unsafe extern "C" {
69    pub fn fdio_null_create() -> *mut fdio_t;
70}
71#[repr(C)]
72#[derive(Debug, Copy, Clone)]
73pub struct zxio_tag {
74    _unused: [u8; 0],
75}
76pub type zxio_t = zxio_tag;
77unsafe extern "C" {
78    pub fn fdio_get_zxio(io: *mut fdio_t) -> *mut zxio_t;
79}
80unsafe extern "C" {
81    pub fn fdio_fd_create_null() -> ::std::os::raw::c_int;
82}
83unsafe extern "C" {
84    pub fn fdio_bind_to_fd(
85        io: *mut fdio_t,
86        fd: ::std::os::raw::c_int,
87        starting_fd: ::std::os::raw::c_int,
88    ) -> ::std::os::raw::c_int;
89}
90unsafe extern "C" {
91    pub fn fdio_unbind_from_fd(fd: ::std::os::raw::c_int, io_out: *mut *mut fdio_t) -> zx_status_t;
92}
93#[repr(C)]
94#[derive(Debug, Copy, Clone)]
95pub struct zxio_storage {
96    _unused: [u8; 0],
97}
98pub type zxio_storage_t = zxio_storage;
99unsafe extern "C" {
100    pub fn fdio_zxio_create(out_storage: *mut *mut zxio_storage_t) -> *mut fdio_t;
101}
102unsafe extern "C" {
103    pub fn fdio_currently_allocated_fd_count() -> usize;
104}
105unsafe extern "C" {
106    pub fn fdio_service_connect(
107        path: *const ::std::os::raw::c_char,
108        request: zx_handle_t,
109    ) -> zx_status_t;
110}
111unsafe extern "C" {
112    pub fn fdio_service_connect_at(
113        directory: zx_handle_t,
114        path: *const ::std::os::raw::c_char,
115        request: zx_handle_t,
116    ) -> zx_status_t;
117}
118unsafe extern "C" {
119    pub fn fdio_service_connect_by_name(
120        name: *const ::std::os::raw::c_char,
121        request: zx_handle_t,
122    ) -> zx_status_t;
123}
124unsafe extern "C" {
125    pub fn fdio_open3(
126        path: *const ::std::os::raw::c_char,
127        flags: u64,
128        request: zx_handle_t,
129    ) -> zx_status_t;
130}
131unsafe extern "C" {
132    pub fn fdio_open3_at(
133        directory: zx_handle_t,
134        path: *const ::std::os::raw::c_char,
135        flags: u64,
136        request: zx_handle_t,
137    ) -> zx_status_t;
138}
139unsafe extern "C" {
140    pub fn fdio_open3_fd(
141        path: *const ::std::os::raw::c_char,
142        flags: u64,
143        out_fd: *mut ::std::os::raw::c_int,
144    ) -> zx_status_t;
145}
146unsafe extern "C" {
147    pub fn fdio_open3_fd_at(
148        dir_fd: ::std::os::raw::c_int,
149        path: *const ::std::os::raw::c_char,
150        flags: u64,
151        out_fd: *mut ::std::os::raw::c_int,
152    ) -> zx_status_t;
153}
154unsafe extern "C" {
155    pub fn fdio_wait_fd(
156        fd: ::std::os::raw::c_int,
157        events: u32,
158        pending: *mut u32,
159        deadline: zx_time_t,
160    ) -> zx_status_t;
161}
162unsafe extern "C" {
163    pub fn fdio_handle_fd(
164        h: zx_handle_t,
165        signals_in: zx_signals_t,
166        signals_out: zx_signals_t,
167        shared_handle: bool,
168    ) -> ::std::os::raw::c_int;
169}
170unsafe extern "C" {
171    pub fn fdio_pipe_half(
172        out_fd: *mut ::std::os::raw::c_int,
173        out_handle: *mut zx_handle_t,
174    ) -> zx_status_t;
175}
176unsafe extern "C" {
177    pub fn fdio_get_vmo_copy(fd: ::std::os::raw::c_int, out_vmo: *mut zx_handle_t) -> zx_status_t;
178}
179unsafe extern "C" {
180    pub fn fdio_get_vmo_clone(fd: ::std::os::raw::c_int, out_vmo: *mut zx_handle_t) -> zx_status_t;
181}
182unsafe extern "C" {
183    pub fn fdio_get_vmo_exact(fd: ::std::os::raw::c_int, out_vmo: *mut zx_handle_t) -> zx_status_t;
184}
185unsafe extern "C" {
186    pub fn fdio_get_vmo_exec(fd: ::std::os::raw::c_int, out_vmo: *mut zx_handle_t) -> zx_status_t;
187}
188unsafe extern "C" {
189    pub fn fdio_transferable_fd(
190        out_fd: *mut ::std::os::raw::c_int,
191        out_handle: *mut zx_handle_t,
192    ) -> zx_status_t;
193}
194#[repr(C)]
195#[derive(Debug, Copy, Clone)]
196pub struct fdio_namespace {
197    _unused: [u8; 0],
198}
199pub type fdio_ns_t = fdio_namespace;
200#[repr(C)]
201#[derive(Debug, Copy, Clone)]
202pub struct zxio_ops {
203    _unused: [u8; 0],
204}
205pub type zxio_ops_t = zxio_ops;
206unsafe extern "C" {
207    pub fn fdio_ns_create(out: *mut *mut fdio_ns_t) -> zx_status_t;
208}
209unsafe extern "C" {
210    pub fn fdio_ns_destroy(ns: *mut fdio_ns_t) -> zx_status_t;
211}
212pub type fdio_open_local_func_t = ::std::option::Option<
213    unsafe extern "C" fn(
214        arg1: *mut zxio_storage_t,
215        arg2: *mut ::std::os::raw::c_void,
216        arg3: *mut *const zxio_ops_t,
217    ) -> zx_status_t,
218>;
219unsafe extern "C" {
220    pub fn fdio_ns_bind_local(
221        ns: *mut fdio_ns_t,
222        path: *const ::std::os::raw::c_char,
223        on_open: fdio_open_local_func_t,
224        context: *mut ::std::os::raw::c_void,
225    ) -> zx_status_t;
226}
227unsafe extern "C" {
228    pub fn fdio_ns_bind(
229        ns: *mut fdio_ns_t,
230        path: *const ::std::os::raw::c_char,
231        remote: zx_handle_t,
232    ) -> zx_status_t;
233}
234unsafe extern "C" {
235    pub fn fdio_ns_unbind(ns: *mut fdio_ns_t, path: *const ::std::os::raw::c_char) -> zx_status_t;
236}
237unsafe extern "C" {
238    pub fn fdio_ns_is_bound(ns: *mut fdio_ns_t, path: *const ::std::os::raw::c_char) -> bool;
239}
240unsafe extern "C" {
241    pub fn fdio_ns_bind_fd(
242        ns: *mut fdio_ns_t,
243        path: *const ::std::os::raw::c_char,
244        fd: ::std::os::raw::c_int,
245    ) -> zx_status_t;
246}
247unsafe extern "C" {
248    pub fn fdio_ns_opendir(ns: *mut fdio_ns_t) -> ::std::os::raw::c_int;
249}
250unsafe extern "C" {
251    pub fn fdio_ns_chdir(ns: *mut fdio_ns_t) -> zx_status_t;
252}
253unsafe extern "C" {
254    pub fn fdio_ns_get_installed(ns: *mut *mut fdio_ns_t) -> zx_status_t;
255}
256#[repr(C)]
257#[derive(Debug, Copy, Clone)]
258pub struct fdio_flat_namespace {
259    pub count: usize,
260    pub handle: *mut zx_handle_t,
261    pub path: *const *const ::std::os::raw::c_char,
262}
263#[allow(clippy::unnecessary_operation, clippy::identity_op)]
264const _: () = {
265    ["Size of fdio_flat_namespace"][::std::mem::size_of::<fdio_flat_namespace>() - 24usize];
266    ["Alignment of fdio_flat_namespace"][::std::mem::align_of::<fdio_flat_namespace>() - 8usize];
267    ["Offset of field: fdio_flat_namespace::count"]
268        [::std::mem::offset_of!(fdio_flat_namespace, count) - 0usize];
269    ["Offset of field: fdio_flat_namespace::handle"]
270        [::std::mem::offset_of!(fdio_flat_namespace, handle) - 8usize];
271    ["Offset of field: fdio_flat_namespace::path"]
272        [::std::mem::offset_of!(fdio_flat_namespace, path) - 16usize];
273};
274impl Default for fdio_flat_namespace {
275    fn default() -> Self {
276        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
277        unsafe {
278            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
279            s.assume_init()
280        }
281    }
282}
283pub type fdio_flat_namespace_t = fdio_flat_namespace;
284unsafe extern "C" {
285    pub fn fdio_ns_export(ns: *mut fdio_ns_t, out: *mut *mut fdio_flat_namespace_t) -> zx_status_t;
286}
287unsafe extern "C" {
288    pub fn fdio_ns_export_root(out: *mut *mut fdio_flat_namespace_t) -> zx_status_t;
289}
290unsafe extern "C" {
291    pub fn fdio_ns_open(
292        ns: *mut fdio_ns_t,
293        path: *const ::std::os::raw::c_char,
294        flags: u32,
295        request: zx_handle_t,
296    ) -> zx_status_t;
297}
298unsafe extern "C" {
299    pub fn fdio_ns_open3(
300        ns: *mut fdio_ns_t,
301        path: *const ::std::os::raw::c_char,
302        flags: u64,
303        request: zx_handle_t,
304    ) -> zx_status_t;
305}
306unsafe extern "C" {
307    pub fn fdio_ns_service_connect(
308        ns: *mut fdio_ns_t,
309        path: *const ::std::os::raw::c_char,
310        request: zx_handle_t,
311    ) -> zx_status_t;
312}
313unsafe extern "C" {
314    pub fn fdio_ns_free_flat_ns(ns: *mut fdio_flat_namespace_t);
315}
316unsafe extern "C" {
317    pub fn fdio_spawn(
318        job: zx_handle_t,
319        flags: u32,
320        path: *const ::std::os::raw::c_char,
321        argv: *const *const ::std::os::raw::c_char,
322        process_out: *mut zx_handle_t,
323    ) -> zx_status_t;
324}
325pub type fdio_spawn_action_t = fdio_spawn_action;
326#[repr(C)]
327#[derive(Copy, Clone)]
328pub struct fdio_spawn_action {
329    pub action: u32,
330    pub __bindgen_anon_1: fdio_spawn_action__bindgen_ty_1,
331}
332#[repr(C)]
333#[derive(Copy, Clone)]
334pub union fdio_spawn_action__bindgen_ty_1 {
335    pub fd: fdio_spawn_action__bindgen_ty_1__bindgen_ty_1,
336    pub ns: fdio_spawn_action__bindgen_ty_1__bindgen_ty_2,
337    pub h: fdio_spawn_action__bindgen_ty_1__bindgen_ty_3,
338    pub name: fdio_spawn_action__bindgen_ty_1__bindgen_ty_4,
339    pub dir: fdio_spawn_action__bindgen_ty_1__bindgen_ty_5,
340}
341#[repr(C)]
342#[derive(Debug, Default, Copy, Clone)]
343pub struct fdio_spawn_action__bindgen_ty_1__bindgen_ty_1 {
344    pub local_fd: ::std::os::raw::c_int,
345    pub target_fd: ::std::os::raw::c_int,
346}
347#[allow(clippy::unnecessary_operation, clippy::identity_op)]
348const _: () = {
349    ["Size of fdio_spawn_action__bindgen_ty_1__bindgen_ty_1"]
350        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_1>() - 8usize];
351    ["Alignment of fdio_spawn_action__bindgen_ty_1__bindgen_ty_1"]
352        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_1>() - 4usize];
353    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_1::local_fd"]
354        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_1, local_fd) - 0usize];
355    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_1::target_fd"]
356        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_1, target_fd) - 4usize];
357};
358#[repr(C)]
359#[derive(Debug, Copy, Clone)]
360pub struct fdio_spawn_action__bindgen_ty_1__bindgen_ty_2 {
361    pub prefix: *const ::std::os::raw::c_char,
362    pub handle: zx_handle_t,
363}
364#[allow(clippy::unnecessary_operation, clippy::identity_op)]
365const _: () = {
366    ["Size of fdio_spawn_action__bindgen_ty_1__bindgen_ty_2"]
367        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_2>() - 16usize];
368    ["Alignment of fdio_spawn_action__bindgen_ty_1__bindgen_ty_2"]
369        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_2>() - 8usize];
370    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_2::prefix"]
371        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_2, prefix) - 0usize];
372    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_2::handle"]
373        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_2, handle) - 8usize];
374};
375impl Default for fdio_spawn_action__bindgen_ty_1__bindgen_ty_2 {
376    fn default() -> Self {
377        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
378        unsafe {
379            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
380            s.assume_init()
381        }
382    }
383}
384#[repr(C)]
385#[derive(Debug, Default, Copy, Clone)]
386pub struct fdio_spawn_action__bindgen_ty_1__bindgen_ty_3 {
387    pub id: u32,
388    pub handle: zx_handle_t,
389}
390#[allow(clippy::unnecessary_operation, clippy::identity_op)]
391const _: () = {
392    ["Size of fdio_spawn_action__bindgen_ty_1__bindgen_ty_3"]
393        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_3>() - 8usize];
394    ["Alignment of fdio_spawn_action__bindgen_ty_1__bindgen_ty_3"]
395        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_3>() - 4usize];
396    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_3::id"]
397        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_3, id) - 0usize];
398    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_3::handle"]
399        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_3, handle) - 4usize];
400};
401#[repr(C)]
402#[derive(Debug, Copy, Clone)]
403pub struct fdio_spawn_action__bindgen_ty_1__bindgen_ty_4 {
404    pub data: *const ::std::os::raw::c_char,
405}
406#[allow(clippy::unnecessary_operation, clippy::identity_op)]
407const _: () = {
408    ["Size of fdio_spawn_action__bindgen_ty_1__bindgen_ty_4"]
409        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_4>() - 8usize];
410    ["Alignment of fdio_spawn_action__bindgen_ty_1__bindgen_ty_4"]
411        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_4>() - 8usize];
412    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_4::data"]
413        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_4, data) - 0usize];
414};
415impl Default for fdio_spawn_action__bindgen_ty_1__bindgen_ty_4 {
416    fn default() -> Self {
417        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
418        unsafe {
419            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
420            s.assume_init()
421        }
422    }
423}
424#[repr(C)]
425#[derive(Debug, Copy, Clone)]
426pub struct fdio_spawn_action__bindgen_ty_1__bindgen_ty_5 {
427    pub prefix: *const ::std::os::raw::c_char,
428}
429#[allow(clippy::unnecessary_operation, clippy::identity_op)]
430const _: () = {
431    ["Size of fdio_spawn_action__bindgen_ty_1__bindgen_ty_5"]
432        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_5>() - 8usize];
433    ["Alignment of fdio_spawn_action__bindgen_ty_1__bindgen_ty_5"]
434        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1__bindgen_ty_5>() - 8usize];
435    ["Offset of field: fdio_spawn_action__bindgen_ty_1__bindgen_ty_5::prefix"]
436        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1__bindgen_ty_5, prefix) - 0usize];
437};
438impl Default for fdio_spawn_action__bindgen_ty_1__bindgen_ty_5 {
439    fn default() -> Self {
440        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
441        unsafe {
442            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
443            s.assume_init()
444        }
445    }
446}
447#[allow(clippy::unnecessary_operation, clippy::identity_op)]
448const _: () = {
449    ["Size of fdio_spawn_action__bindgen_ty_1"]
450        [::std::mem::size_of::<fdio_spawn_action__bindgen_ty_1>() - 16usize];
451    ["Alignment of fdio_spawn_action__bindgen_ty_1"]
452        [::std::mem::align_of::<fdio_spawn_action__bindgen_ty_1>() - 8usize];
453    ["Offset of field: fdio_spawn_action__bindgen_ty_1::fd"]
454        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1, fd) - 0usize];
455    ["Offset of field: fdio_spawn_action__bindgen_ty_1::ns"]
456        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1, ns) - 0usize];
457    ["Offset of field: fdio_spawn_action__bindgen_ty_1::h"]
458        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1, h) - 0usize];
459    ["Offset of field: fdio_spawn_action__bindgen_ty_1::name"]
460        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1, name) - 0usize];
461    ["Offset of field: fdio_spawn_action__bindgen_ty_1::dir"]
462        [::std::mem::offset_of!(fdio_spawn_action__bindgen_ty_1, dir) - 0usize];
463};
464impl Default for fdio_spawn_action__bindgen_ty_1 {
465    fn default() -> Self {
466        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
467        unsafe {
468            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
469            s.assume_init()
470        }
471    }
472}
473impl ::std::fmt::Debug for fdio_spawn_action__bindgen_ty_1 {
474    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
475        write!(f, "fdio_spawn_action__bindgen_ty_1 {{ union }}")
476    }
477}
478#[allow(clippy::unnecessary_operation, clippy::identity_op)]
479const _: () = {
480    ["Size of fdio_spawn_action"][::std::mem::size_of::<fdio_spawn_action>() - 24usize];
481    ["Alignment of fdio_spawn_action"][::std::mem::align_of::<fdio_spawn_action>() - 8usize];
482    ["Offset of field: fdio_spawn_action::action"]
483        [::std::mem::offset_of!(fdio_spawn_action, action) - 0usize];
484};
485impl Default for fdio_spawn_action {
486    fn default() -> Self {
487        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
488        unsafe {
489            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
490            s.assume_init()
491        }
492    }
493}
494impl ::std::fmt::Debug for fdio_spawn_action {
495    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
496        write!(f, "fdio_spawn_action {{ __bindgen_anon_1: {:?} }}", self.__bindgen_anon_1)
497    }
498}
499unsafe extern "C" {
500    pub fn fdio_spawn_etc(
501        job: zx_handle_t,
502        flags: u32,
503        path: *const ::std::os::raw::c_char,
504        argv: *const *const ::std::os::raw::c_char,
505        environ: *const *const ::std::os::raw::c_char,
506        action_count: usize,
507        actions: *const fdio_spawn_action_t,
508        process_out: *mut zx_handle_t,
509        err_msg_out: *mut ::std::os::raw::c_char,
510    ) -> zx_status_t;
511}
512unsafe extern "C" {
513    pub fn fdio_spawn_vmo(
514        job: zx_handle_t,
515        flags: u32,
516        executable_vmo: zx_handle_t,
517        argv: *const *const ::std::os::raw::c_char,
518        environ: *const *const ::std::os::raw::c_char,
519        action_count: usize,
520        actions: *const fdio_spawn_action_t,
521        process_out: *mut zx_handle_t,
522        err_msg_out: *mut ::std::os::raw::c_char,
523    ) -> zx_status_t;
524}
525unsafe extern "C" {
526    pub fn fdio_unsafe_fd_to_io(fd: ::std::os::raw::c_int) -> *mut fdio_t;
527}
528unsafe extern "C" {
529    pub fn fdio_unsafe_borrow_channel(io: *mut fdio_t) -> zx_handle_t;
530}
531unsafe extern "C" {
532    pub fn fdio_unsafe_release(io: *mut fdio_t);
533}
534unsafe extern "C" {
535    pub fn fdio_unsafe_wait_begin(
536        io: *mut fdio_t,
537        events: u32,
538        handle_out: *mut zx_handle_t,
539        signals_out: *mut zx_signals_t,
540    );
541}
542unsafe extern "C" {
543    pub fn fdio_unsafe_wait_end(io: *mut fdio_t, signals: zx_signals_t, events_out: *mut u32);
544}
545pub type watchdir_func_t = ::std::option::Option<
546    unsafe extern "C" fn(
547        dirfd: ::std::os::raw::c_int,
548        event: ::std::os::raw::c_int,
549        fn_: *const ::std::os::raw::c_char,
550        cookie: *mut ::std::os::raw::c_void,
551    ) -> zx_status_t,
552>;
553unsafe extern "C" {
554    pub fn fdio_watch_directory(
555        dirfd: ::std::os::raw::c_int,
556        cb: watchdir_func_t,
557        deadline: zx_time_t,
558        cookie: *mut ::std::os::raw::c_void,
559    ) -> zx_status_t;
560}