1
2
3
/* automatically generated by rust-bindgen */

# [ repr ( C ) ] # [ derive ( Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd ) ] pub struct __BindgenBitfieldUnit < Storage , Align > { storage : Storage , align : [ Align ; 0 ] , } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > { # [ inline ] pub const fn new ( storage : Storage ) -> Self { Self { storage , align : [ ] } } } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > where Storage : AsRef < [ u8 ] > + AsMut < [ u8 ] >, { # [ inline ] pub fn get_bit ( & self , index : usize ) -> bool { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = self . storage . as_ref ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [ inline ] pub fn set_bit ( & mut self , index : usize , val : bool ) { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [ inline ] pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; let mut val = 0 ; for i in 0 .. ( bit_width as usize ) { if self . get_bit ( i + bit_offset ) { let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [ inline ] pub fn set ( & mut self , bit_offset : usize , bit_width : u8 , val : u64 ) { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; for i in 0 .. ( bit_width as usize ) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; self . set_bit ( index + bit_offset , val_bit_is_set ) ; } } } pub const FUSE_OPT_KEY_OPT : i32 = -1 ; pub const FUSE_OPT_KEY_NONOPT : i32 = -2 ; pub const FUSE_OPT_KEY_KEEP : i32 = -3 ; pub const FUSE_OPT_KEY_DISCARD : i32 = -4 ; pub const FUSE_MAJOR_VERSION : u32 = 2 ; pub const FUSE_MINOR_VERSION : u32 = 9 ; pub const FUSE_CAP_ASYNC_READ : u32 = 1 ; pub const FUSE_CAP_POSIX_LOCKS : u32 = 2 ; pub const FUSE_CAP_ATOMIC_O_TRUNC : u32 = 8 ; pub const FUSE_CAP_EXPORT_SUPPORT : u32 = 16 ; pub const FUSE_CAP_BIG_WRITES : u32 = 32 ; pub const FUSE_CAP_DONT_MASK : u32 = 64 ; pub const FUSE_CAP_SPLICE_WRITE : u32 = 128 ; pub const FUSE_CAP_SPLICE_MOVE : u32 = 256 ; pub const FUSE_CAP_SPLICE_READ : u32 = 512 ; pub const FUSE_CAP_FLOCK_LOCKS : u32 = 1024 ; pub const FUSE_CAP_IOCTL_DIR : u32 = 2048 ; pub const FUSE_IOCTL_COMPAT : u32 = 1 ; pub const FUSE_IOCTL_UNRESTRICTED : u32 = 2 ; pub const FUSE_IOCTL_RETRY : u32 = 4 ; pub const FUSE_IOCTL_DIR : u32 = 16 ; pub const FUSE_IOCTL_MAX_IOV : u32 = 256 ; pub const FUSE_ROOT_ID : u32 = 1 ; pub const FUSE_SET_ATTR_MODE : u32 = 1 ; pub const FUSE_SET_ATTR_UID : u32 = 2 ; pub const FUSE_SET_ATTR_GID : u32 = 4 ; pub const FUSE_SET_ATTR_SIZE : u32 = 8 ; pub const FUSE_SET_ATTR_ATIME : u32 = 16 ; pub const FUSE_SET_ATTR_MTIME : u32 = 32 ; pub const FUSE_SET_ATTR_ATIME_NOW : u32 = 128 ; pub const FUSE_SET_ATTR_MTIME_NOW : u32 = 256 ; # [ doc = " Option description" ] # [ doc = "" ] # [ doc = " This structure describes a single option, and action associated" ] # [ doc = " with it, in case it matches." ] # [ doc = "" ] # [ doc = " More than one such match may occur, in which case the action for" ] # [ doc = " each match is executed." ] # [ doc = "" ] # [ doc = " There are three possible actions in case of a match:" ] # [ doc = "" ] # [ doc = " i) An integer (int or unsigned) variable determined by 'offset' is" ] # [ doc = "    set to 'value'" ] # [ doc = "" ] # [ doc = " ii) The processing function is called, with 'value' as the key" ] # [ doc = "" ] # [ doc = " iii) An integer (any) or string (char *) variable determined by" ] # [ doc = "    'offset' is set to the value of an option parameter" ] # [ doc = "" ] # [ doc = " 'offset' should normally be either set to" ] # [ doc = "" ] # [ doc = "  - 'offsetof(struct foo, member)'  actions i) and iii)" ] # [ doc = "" ] # [ doc = "  - -1\t\t\t      action ii)" ] # [ doc = "" ] # [ doc = " The 'offsetof()' macro is defined in the <stddef.h> header." ] # [ doc = "" ] # [ doc = " The template determines which options match, and also have an" ] # [ doc = " effect on the action.  Normally the action is either i) or ii), but" ] # [ doc = " if a format is present in the template, then action iii) is" ] # [ doc = " performed." ] # [ doc = "" ] # [ doc = " The types of templates are:" ] # [ doc = "" ] # [ doc = " 1) \"-x\", \"-foo\", \"--foo\", \"--foo-bar\", etc.\tThese match only" ] # [ doc = "   themselves.  Invalid values are \"--\" and anything beginning" ] # [ doc = "   with \"-o\"" ] # [ doc = "" ] # [ doc = " 2) \"foo\", \"foo-bar\", etc.  These match \"-ofoo\", \"-ofoo-bar\" or" ] # [ doc = "    the relevant option in a comma separated option list" ] # [ doc = "" ] # [ doc = " 3) \"bar=\", \"--foo=\", etc.  These are variations of 1) and 2)" ] # [ doc = "    which have a parameter" ] # [ doc = "" ] # [ doc = " 4) \"bar=%s\", \"--foo=%lu\", etc.  Same matching as above but perform" ] # [ doc = "    action iii)." ] # [ doc = "" ] # [ doc = " 5) \"-x \", etc.  Matches either \"-xparam\" or \"-x param\" as" ] # [ doc = "    two separate arguments" ] # [ doc = "" ] # [ doc = " 6) \"-x %s\", etc.  Combination of 4) and 5)" ] # [ doc = "" ] # [ doc = " If the format is \"%s\", memory is allocated for the string unlike" ] # [ doc = " with scanf()." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_opt { # [ doc = " Matching template and optional parameter formatting" ] pub templ : * const :: std :: os :: raw :: c_char , # [ doc = " Offset of variable within 'data' parameter of fuse_opt_parse()" ] # [ doc = " or -1" ] pub offset : :: std :: os :: raw :: c_ulong , # [ doc = " Value to set the variable to, or to be passed as 'key' to the" ] # [ doc = " processing function.\t Ignored if template has a format" ] pub value : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_fuse_opt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_opt > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( fuse_opt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_opt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_opt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_opt > ( ) ) ) . templ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_opt ) , "::" , stringify ! ( templ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_opt > ( ) ) ) . offset as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_opt ) , "::" , stringify ! ( offset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_opt > ( ) ) ) . value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_opt ) , "::" , stringify ! ( value ) ) ) ; } impl Default for fuse_opt { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ doc = " Argument list" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_args { # [ doc = " Argument count" ] pub argc : :: std :: os :: raw :: c_int , # [ doc = " Argument vector.  NULL terminated" ] pub argv : * mut * mut :: std :: os :: raw :: c_char , # [ doc = " Is 'argv' allocated?" ] pub allocated : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_fuse_args ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_args > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( fuse_args ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_args > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_args ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_args > ( ) ) ) . argc as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_args ) , "::" , stringify ! ( argc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_args > ( ) ) ) . argv as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_args ) , "::" , stringify ! ( argv ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_args > ( ) ) ) . allocated as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_args ) , "::" , stringify ! ( allocated ) ) ) ; } impl Default for fuse_args { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ doc = " Processing function" ] # [ doc = "" ] # [ doc = " This function is called if" ] # [ doc = "    - option did not match any 'struct fuse_opt'" ] # [ doc = "    - argument is a non-option" ] # [ doc = "    - option did match and offset was set to -1" ] # [ doc = "" ] # [ doc = " The 'arg' parameter will always contain the whole argument or" ] # [ doc = " option including the parameter if exists.  A two-argument option" ] # [ doc = " (\"-x foo\") is always converted to single argument option of the" ] # [ doc = " form \"-xfoo\" before this function is called." ] # [ doc = "" ] # [ doc = " Options of the form '-ofoo' are passed to this function without the" ] # [ doc = " '-o' prefix." ] # [ doc = "" ] # [ doc = " The return value of this function determines whether this argument" ] # [ doc = " is to be inserted into the output argument vector, or discarded." ] # [ doc = "" ] # [ doc = " @param data is the user data passed to the fuse_opt_parse() function" ] # [ doc = " @param arg is the whole argument or option" ] # [ doc = " @param key determines why the processing function was called" ] # [ doc = " @param outargs the current output argument list" ] # [ doc = " @return -1 on error, 0 if arg is to be discarded, 1 if arg should be kept" ] pub type fuse_opt_proc_t = :: std :: option :: Option < unsafe extern "C" fn ( data : * mut :: std :: os :: raw :: c_void , arg : * const :: std :: os :: raw :: c_char , key : :: std :: os :: raw :: c_int , outargs : * mut fuse_args ) -> :: std :: os :: raw :: c_int > ; extern "C" { # [ doc = " Option parsing function" ] # [ doc = "" ] # [ doc = " If 'args' was returned from a previous call to fuse_opt_parse() or" ] # [ doc = " it was constructed from" ] # [ doc = "" ] # [ doc = " A NULL 'args' is equivalent to an empty argument vector" ] # [ doc = "" ] # [ doc = " A NULL 'opts' is equivalent to an 'opts' array containing a single" ] # [ doc = " end marker" ] # [ doc = "" ] # [ doc = " A NULL 'proc' is equivalent to a processing function always" ] # [ doc = " returning '1'" ] # [ doc = "" ] # [ doc = " @param args is the input and output argument list" ] # [ doc = " @param data is the user data" ] # [ doc = " @param opts is the option description array" ] # [ doc = " @param proc is the processing function" ] # [ doc = " @return -1 on error, 0 on success" ] pub fn fuse_opt_parse ( args : * mut fuse_args , data : * mut :: std :: os :: raw :: c_void , opts : * const fuse_opt , proc_ : fuse_opt_proc_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add an option to a comma separated option list" ] # [ doc = "" ] # [ doc = " @param opts is a pointer to an option list, may point to a NULL value" ] # [ doc = " @param opt is the option to add" ] # [ doc = " @return -1 on allocation error, 0 on success" ] pub fn fuse_opt_add_opt ( opts : * mut * mut :: std :: os :: raw :: c_char , opt : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add an option, escaping commas, to a comma separated option list" ] # [ doc = "" ] # [ doc = " @param opts is a pointer to an option list, may point to a NULL value" ] # [ doc = " @param opt is the option to add" ] # [ doc = " @return -1 on allocation error, 0 on success" ] pub fn fuse_opt_add_opt_escaped ( opts : * mut * mut :: std :: os :: raw :: c_char , opt : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add an argument to a NULL terminated argument vector" ] # [ doc = "" ] # [ doc = " @param args is the structure containing the current argument list" ] # [ doc = " @param arg is the new argument to add" ] # [ doc = " @return -1 on allocation error, 0 on success" ] pub fn fuse_opt_add_arg ( args : * mut fuse_args , arg : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add an argument at the specified position in a NULL terminated" ] # [ doc = " argument vector" ] # [ doc = "" ] # [ doc = " Adds the argument to the N-th position.  This is useful for adding" ] # [ doc = " options at the beginning of the array which must not come after the" ] # [ doc = " special '--' option." ] # [ doc = "" ] # [ doc = " @param args is the structure containing the current argument list" ] # [ doc = " @param pos is the position at which to add the argument" ] # [ doc = " @param arg is the new argument to add" ] # [ doc = " @return -1 on allocation error, 0 on success" ] pub fn fuse_opt_insert_arg ( args : * mut fuse_args , pos : :: std :: os :: raw :: c_int , arg : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Free the contents of argument list" ] # [ doc = "" ] # [ doc = " The structure itself is not freed" ] # [ doc = "" ] # [ doc = " @param args is the structure containing the argument list" ] pub fn fuse_opt_free_args ( args : * mut fuse_args ) ; } extern "C" { # [ doc = " Check if an option matches" ] # [ doc = "" ] # [ doc = " @param opts is the option description array" ] # [ doc = " @param opt is the option to match" ] # [ doc = " @return 1 if a match is found, 0 if not" ] pub fn fuse_opt_match ( opts : * const fuse_opt , opt : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } # [ doc = " Information about open files" ] # [ doc = "" ] # [ doc = " Changed in version 2.5" ] # [ repr ( C ) ] pub struct fuse_file_info { # [ doc = " Open flags.\t Available in open() and release()" ] pub flags : :: std :: os :: raw :: c_int , # [ doc = " Old file handle, don't use" ] pub fh_old : :: std :: os :: raw :: c_ulong , # [ doc = " In case of a write operation indicates if this was caused by a" ] # [ doc = "writepage" ] pub writepage : :: std :: os :: raw :: c_int , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 4usize ] , u32 > , # [ doc = " File handle.  May be filled in by filesystem in open()." ] # [ doc = "Available in all other file operations" ] pub fh : u64 , # [ doc = " Lock owner id.  Available in locking operations and flush" ] pub lock_owner : u64 , } # [ test ] fn bindgen_test_layout_fuse_file_info ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_file_info > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( fuse_file_info ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_file_info > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_file_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_file_info > ( ) ) ) . flags as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_file_info ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_file_info > ( ) ) ) . fh_old as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_file_info ) , "::" , stringify ! ( fh_old ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_file_info > ( ) ) ) . writepage as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_file_info ) , "::" , stringify ! ( writepage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_file_info > ( ) ) ) . fh as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_file_info ) , "::" , stringify ! ( fh ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_file_info > ( ) ) ) . lock_owner as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( fuse_file_info ) , "::" , stringify ! ( lock_owner ) ) ) ; } impl Default for fuse_file_info { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl fuse_file_info { # [ inline ] pub fn direct_io ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_direct_io ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn keep_cache ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_keep_cache ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn flush ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 2usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_flush ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 2usize , 1u8 , val as u64 ) } } # [ inline ] pub fn nonseekable ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 3usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_nonseekable ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 3usize , 1u8 , val as u64 ) } } # [ inline ] pub fn flock_release ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 4usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_flock_release ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 4usize , 1u8 , val as u64 ) } } # [ inline ] pub fn padding ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 5usize , 27u8 ) as u32 ) } } # [ inline ] pub fn set_padding ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 5usize , 27u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( direct_io : :: std :: os :: raw :: c_uint , keep_cache : :: std :: os :: raw :: c_uint , flush : :: std :: os :: raw :: c_uint , nonseekable : :: std :: os :: raw :: c_uint , flock_release : :: std :: os :: raw :: c_uint , padding : :: std :: os :: raw :: c_uint ) -> __BindgenBitfieldUnit < [ u8 ; 4usize ] , u32 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 4usize ] , u32 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let direct_io : u32 = unsafe { :: std :: mem :: transmute ( direct_io ) } ; direct_io as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let keep_cache : u32 = unsafe { :: std :: mem :: transmute ( keep_cache ) } ; keep_cache as u64 } ) ; __bindgen_bitfield_unit . set ( 2usize , 1u8 , { let flush : u32 = unsafe { :: std :: mem :: transmute ( flush ) } ; flush as u64 } ) ; __bindgen_bitfield_unit . set ( 3usize , 1u8 , { let nonseekable : u32 = unsafe { :: std :: mem :: transmute ( nonseekable ) } ; nonseekable as u64 } ) ; __bindgen_bitfield_unit . set ( 4usize , 1u8 , { let flock_release : u32 = unsafe { :: std :: mem :: transmute ( flock_release ) } ; flock_release as u64 } ) ; __bindgen_bitfield_unit . set ( 5usize , 27u8 , { let padding : u32 = unsafe { :: std :: mem :: transmute ( padding ) } ; padding as u64 } ) ; __bindgen_bitfield_unit } } # [ doc = " Connection information, passed to the ->init() method" ] # [ doc = "" ] # [ doc = " Some of the elements are read-write, these can be changed to" ] # [ doc = " indicate the value requested by the filesystem.  The requested" ] # [ doc = " value must usually be smaller than the indicated value." ] # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct fuse_conn_info { # [ doc = " Major version of the protocol (read-only)" ] pub proto_major : :: std :: os :: raw :: c_uint , # [ doc = " Minor version of the protocol (read-only)" ] pub proto_minor : :: std :: os :: raw :: c_uint , # [ doc = " Is asynchronous read supported (read-write)" ] pub async_read : :: std :: os :: raw :: c_uint , # [ doc = " Maximum size of the write buffer" ] pub max_write : :: std :: os :: raw :: c_uint , # [ doc = " Maximum readahead" ] pub max_readahead : :: std :: os :: raw :: c_uint , # [ doc = " Capability flags, that the kernel supports" ] pub capable : :: std :: os :: raw :: c_uint , # [ doc = " Capability flags, that the filesystem wants to enable" ] pub want : :: std :: os :: raw :: c_uint , # [ doc = " Maximum number of backgrounded requests" ] pub max_background : :: std :: os :: raw :: c_uint , # [ doc = " Kernel congestion threshold parameter" ] pub congestion_threshold : :: std :: os :: raw :: c_uint , # [ doc = " For future use." ] pub reserved : [ :: std :: os :: raw :: c_uint ; 23usize ] , } # [ test ] fn bindgen_test_layout_fuse_conn_info ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_conn_info > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( fuse_conn_info ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_conn_info > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( fuse_conn_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . proto_major as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( proto_major ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . proto_minor as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( proto_minor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . async_read as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( async_read ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . max_write as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( max_write ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . max_readahead as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( max_readahead ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . capable as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( capable ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . want as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( want ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . max_background as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( max_background ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . congestion_threshold as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( congestion_threshold ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_conn_info > ( ) ) ) . reserved as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( fuse_conn_info ) , "::" , stringify ! ( reserved ) ) ) ; } # [ doc = " Session" ] # [ doc = "" ] # [ doc = " This provides hooks for processing requests, and exiting" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_session { _unused : [ u8 ; 0 ] , } # [ doc = " Channel" ] # [ doc = "" ] # [ doc = " A communication channel, providing hooks for sending and receiving" ] # [ doc = " messages" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_chan { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_pollhandle { _unused : [ u8 ; 0 ] , } extern "C" { # [ doc = " Create a FUSE mountpoint" ] # [ doc = "" ] # [ doc = " Returns a control file descriptor suitable for passing to" ] # [ doc = " fuse_new()" ] # [ doc = "" ] # [ doc = " @param mountpoint the mount point path" ] # [ doc = " @param args argument vector" ] # [ doc = " @return the communication channel on success, NULL on failure" ] pub fn fuse_mount ( mountpoint : * const :: std :: os :: raw :: c_char , args : * mut fuse_args ) -> * mut fuse_chan ; } extern "C" { # [ doc = " Umount a FUSE mountpoint" ] # [ doc = "" ] # [ doc = " @param mountpoint the mount point path" ] # [ doc = " @param ch the communication channel" ] pub fn fuse_unmount ( mountpoint : * const :: std :: os :: raw :: c_char , ch : * mut fuse_chan ) ; } extern "C" { # [ doc = " Parse common options" ] # [ doc = "" ] # [ doc = " The following options are parsed:" ] # [ doc = "" ] # [ doc = "   '-f'\t     foreground" ] # [ doc = "   '-d' '-odebug'  foreground, but keep the debug option" ] # [ doc = "   '-s'\t     single threaded" ] # [ doc = "   '-h' '--help'   help" ] # [ doc = "   '-ho'\t     help without header" ] # [ doc = "   '-ofsname=..'   file system name, if not present, then set to the program" ] # [ doc = "\t\t     name" ] # [ doc = "" ] # [ doc = " All parameters may be NULL" ] # [ doc = "" ] # [ doc = " @param args argument vector" ] # [ doc = " @param mountpoint the returned mountpoint, should be freed after use" ] # [ doc = " @param multithreaded set to 1 unless the '-s' option is present" ] # [ doc = " @param foreground set to 1 if one of the relevant options is present" ] # [ doc = " @return 0 on success, -1 on failure" ] pub fn fuse_parse_cmdline ( args : * mut fuse_args , mountpoint : * mut * mut :: std :: os :: raw :: c_char , multithreaded : * mut :: std :: os :: raw :: c_int , foreground : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Go into the background" ] # [ doc = "" ] # [ doc = " @param foreground if true, stay in the foreground" ] # [ doc = " @return 0 on success, -1 on failure" ] pub fn fuse_daemonize ( foreground : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get the version of the library" ] # [ doc = "" ] # [ doc = " @return the version" ] pub fn fuse_version ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Destroy poll handle" ] # [ doc = "" ] # [ doc = " @param ph the poll handle" ] pub fn fuse_pollhandle_destroy ( ph : * mut fuse_pollhandle ) ; } # [ doc = " Buffer contains a file descriptor" ] # [ doc = "" ] # [ doc = " If this flag is set, the .fd field is valid, otherwise the" ] # [ doc = " .mem fields is valid." ] pub const fuse_buf_flags_FUSE_BUF_IS_FD : fuse_buf_flags = 2 ; # [ doc = " Seek on the file descriptor" ] # [ doc = "" ] # [ doc = " If this flag is set then the .pos field is valid and is" ] # [ doc = " used to seek to the given offset before performing" ] # [ doc = " operation on file descriptor." ] pub const fuse_buf_flags_FUSE_BUF_FD_SEEK : fuse_buf_flags = 4 ; # [ doc = " Retry operation on file descriptor" ] # [ doc = "" ] # [ doc = " If this flag is set then retry operation on file descriptor" ] # [ doc = " until .size bytes have been copied or an error or EOF is" ] # [ doc = " detected." ] pub const fuse_buf_flags_FUSE_BUF_FD_RETRY : fuse_buf_flags = 8 ; # [ doc = " Buffer flags" ] pub type fuse_buf_flags = u32 ; # [ doc = " Don't use splice(2)" ] # [ doc = "" ] # [ doc = " Always fall back to using read and write instead of" ] # [ doc = " splice(2) to copy data from one file descriptor to another." ] # [ doc = "" ] # [ doc = " If this flag is not set, then only fall back if splice is" ] # [ doc = " unavailable." ] pub const fuse_buf_copy_flags_FUSE_BUF_NO_SPLICE : fuse_buf_copy_flags = 2 ; # [ doc = " Force splice" ] # [ doc = "" ] # [ doc = " Always use splice(2) to copy data from one file descriptor" ] # [ doc = " to another.  If splice is not available, return -EINVAL." ] pub const fuse_buf_copy_flags_FUSE_BUF_FORCE_SPLICE : fuse_buf_copy_flags = 4 ; # [ doc = " Try to move data with splice." ] # [ doc = "" ] # [ doc = " If splice is used, try to move pages from the source to the" ] # [ doc = " destination instead of copying.  See documentation of" ] # [ doc = " SPLICE_F_MOVE in splice(2) man page." ] pub const fuse_buf_copy_flags_FUSE_BUF_SPLICE_MOVE : fuse_buf_copy_flags = 8 ; # [ doc = " Don't block on the pipe when copying data with splice" ] # [ doc = "" ] # [ doc = " Makes the operations on the pipe non-blocking (if the pipe" ] # [ doc = " is full or empty).  See SPLICE_F_NONBLOCK in the splice(2)" ] # [ doc = " man page." ] pub const fuse_buf_copy_flags_FUSE_BUF_SPLICE_NONBLOCK : fuse_buf_copy_flags = 16 ; # [ doc = " Buffer copy flags" ] pub type fuse_buf_copy_flags = u32 ; # [ doc = " Single data buffer" ] # [ doc = "" ] # [ doc = " Generic data buffer for I/O, extended attributes, etc...  Data may" ] # [ doc = " be supplied as a memory pointer or as a file descriptor" ] # [ repr ( C ) ] pub struct fuse_buf { # [ doc = " Size of data in bytes" ] pub size : usize , # [ doc = " Buffer flags" ] pub flags : fuse_buf_flags , # [ doc = " Memory pointer" ] # [ doc = "" ] # [ doc = " Used unless FUSE_BUF_IS_FD flag is set." ] pub mem : * mut :: std :: os :: raw :: c_void , # [ doc = " File descriptor" ] # [ doc = "" ] # [ doc = " Used if FUSE_BUF_IS_FD flag is set." ] pub fd : :: std :: os :: raw :: c_int , # [ doc = " File position" ] # [ doc = "" ] # [ doc = " Used if FUSE_BUF_FD_SEEK flag is set." ] pub pos : off_t , } # [ test ] fn bindgen_test_layout_fuse_buf ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_buf > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( fuse_buf ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_buf > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_buf > ( ) ) ) . size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_buf ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_buf > ( ) ) ) . flags as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_buf ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_buf > ( ) ) ) . mem as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_buf ) , "::" , stringify ! ( mem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_buf > ( ) ) ) . fd as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_buf ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_buf > ( ) ) ) . pos as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( fuse_buf ) , "::" , stringify ! ( pos ) ) ) ; } impl Default for fuse_buf { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ doc = " Data buffer vector" ] # [ doc = "" ] # [ doc = " An array of data buffers, each containing a memory pointer or a" ] # [ doc = " file descriptor." ] # [ doc = "" ] # [ doc = " Allocate dynamically to add more than one buffer." ] # [ repr ( C ) ] pub struct fuse_bufvec { # [ doc = " Number of buffers in the array" ] pub count : usize , # [ doc = " Index of current buffer within the array" ] pub idx : usize , # [ doc = " Current offset within the current buffer" ] pub off : usize , # [ doc = " Array of buffers" ] pub buf : [ fuse_buf ; 1usize ] , } # [ test ] fn bindgen_test_layout_fuse_bufvec ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_bufvec > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( fuse_bufvec ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_bufvec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_bufvec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_bufvec > ( ) ) ) . count as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_bufvec ) , "::" , stringify ! ( count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_bufvec > ( ) ) ) . idx as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_bufvec ) , "::" , stringify ! ( idx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_bufvec > ( ) ) ) . off as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_bufvec ) , "::" , stringify ! ( off ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_bufvec > ( ) ) ) . buf as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_bufvec ) , "::" , stringify ! ( buf ) ) ) ; } impl Default for fuse_bufvec { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } extern "C" { # [ doc = " Get total size of data in a fuse buffer vector" ] # [ doc = "" ] # [ doc = " @param bufv buffer vector" ] # [ doc = " @return size of data" ] pub fn fuse_buf_size ( bufv : * const fuse_bufvec ) -> usize ; } extern "C" { # [ doc = " Copy data from one buffer vector to another" ] # [ doc = "" ] # [ doc = " @param dst destination buffer vector" ] # [ doc = " @param src source buffer vector" ] # [ doc = " @param flags flags controlling the copy" ] # [ doc = " @return actual number of bytes copied or -errno on error" ] pub fn fuse_buf_copy ( dst : * mut fuse_bufvec , src : * mut fuse_bufvec , flags : fuse_buf_copy_flags ) -> isize ; } extern "C" { # [ doc = " Exit session on HUP, TERM and INT signals and ignore PIPE signal" ] # [ doc = "" ] # [ doc = " Stores session in a global variable.\t May only be called once per" ] # [ doc = " process until fuse_remove_signal_handlers() is called." ] # [ doc = "" ] # [ doc = " @param se the session to exit" ] # [ doc = " @return 0 on success, -1 on failure" ] pub fn fuse_set_signal_handlers ( se : * mut fuse_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Restore default signal handlers" ] # [ doc = "" ] # [ doc = " Resets global session.  After this fuse_set_signal_handlers() may" ] # [ doc = " be called again." ] # [ doc = "" ] # [ doc = " @param se the same session as given in fuse_set_signal_handlers()" ] pub fn fuse_remove_signal_handlers ( se : * mut fuse_session ) ; } # [ doc = " Inode number type" ] pub type fuse_ino_t = :: std :: os :: raw :: c_ulong ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct fuse_req { _unused : [ u8 ; 0 ] , } # [ doc = " Request pointer type" ] pub type fuse_req_t = * mut fuse_req ; # [ doc = " Directory entry parameters supplied to fuse_reply_entry()" ] # [ repr ( C ) ] pub struct fuse_entry_param { # [ doc = " Unique inode number" ] # [ doc = "" ] # [ doc = " In lookup, zero means negative entry (from version 2.5)" ] # [ doc = " Returning ENOENT also means negative entry, but by setting zero" ] # [ doc = " ino the kernel may cache negative entries for entry_timeout" ] # [ doc = " seconds." ] pub ino : fuse_ino_t , # [ doc = " Generation number for this entry." ] # [ doc = "" ] # [ doc = " If the file system will be exported over NFS, the" ] # [ doc = " ino/generation pairs need to be unique over the file" ] # [ doc = " system's lifetime (rather than just the mount time). So if" ] # [ doc = " the file system reuses an inode after it has been deleted," ] # [ doc = " it must assign a new, previously unused generation number" ] # [ doc = " to the inode at the same time." ] # [ doc = "" ] # [ doc = " The generation must be non-zero, otherwise FUSE will treat" ] # [ doc = " it as an error." ] # [ doc = "" ] pub generation : :: std :: os :: raw :: c_ulong , # [ doc = " Inode attributes." ] # [ doc = "" ] # [ doc = " Even if attr_timeout == 0, attr must be correct. For example," ] # [ doc = " for open(), FUSE uses attr.st_size from lookup() to determine" ] # [ doc = " how many bytes to request. If this value is not correct," ] # [ doc = " incorrect data will be returned." ] pub attr : stat , # [ doc = " Validity timeout (in seconds) for the attributes" ] pub attr_timeout : f64 , # [ doc = " Validity timeout (in seconds) for the name" ] pub entry_timeout : f64 , } # [ test ] fn bindgen_test_layout_fuse_entry_param ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_entry_param > ( ) , 176usize , concat ! ( "Size of: " , stringify ! ( fuse_entry_param ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_entry_param > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_entry_param ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_entry_param > ( ) ) ) . ino as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_entry_param ) , "::" , stringify ! ( ino ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_entry_param > ( ) ) ) . generation as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_entry_param ) , "::" , stringify ! ( generation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_entry_param > ( ) ) ) . attr as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_entry_param ) , "::" , stringify ! ( attr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_entry_param > ( ) ) ) . attr_timeout as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( fuse_entry_param ) , "::" , stringify ! ( attr_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_entry_param > ( ) ) ) . entry_timeout as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( fuse_entry_param ) , "::" , stringify ! ( entry_timeout ) ) ) ; } impl Default for fuse_entry_param { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ doc = " Additional context associated with requests." ] # [ doc = "" ] # [ doc = " Note that the reported client uid, gid and pid may be zero in some" ] # [ doc = " situations. For example, if the FUSE file system is running in a" ] # [ doc = " PID or user namespace but then accessed from outside the namespace," ] # [ doc = " there is no valid uid/pid/gid that could be reported." ] # [ repr ( C ) ] pub struct fuse_ctx { # [ doc = " User ID of the calling process" ] pub uid : uid_t , # [ doc = " Group ID of the calling process" ] pub gid : gid_t , # [ doc = " Thread ID of the calling process" ] pub pid : pid_t , # [ doc = " Umask of the calling process (introduced in version 2.8)" ] pub umask : mode_t , } # [ test ] fn bindgen_test_layout_fuse_ctx ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_ctx > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( fuse_ctx ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_ctx > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( fuse_ctx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_ctx > ( ) ) ) . uid as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_ctx ) , "::" , stringify ! ( uid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_ctx > ( ) ) ) . gid as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( fuse_ctx ) , "::" , stringify ! ( gid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_ctx > ( ) ) ) . pid as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_ctx ) , "::" , stringify ! ( pid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_ctx > ( ) ) ) . umask as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( fuse_ctx ) , "::" , stringify ! ( umask ) ) ) ; } impl Default for fuse_ctx { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ repr ( C ) ] pub struct fuse_forget_data { pub ino : u64 , pub nlookup : u64 , } # [ test ] fn bindgen_test_layout_fuse_forget_data ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_forget_data > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( fuse_forget_data ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_forget_data > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_forget_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_forget_data > ( ) ) ) . ino as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_forget_data ) , "::" , stringify ! ( ino ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_forget_data > ( ) ) ) . nlookup as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_forget_data ) , "::" , stringify ! ( nlookup ) ) ) ; } impl Default for fuse_forget_data { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ doc = " Low level filesystem operations" ] # [ doc = "" ] # [ doc = " Most of the methods (with the exception of init and destroy)" ] # [ doc = " receive a request handle (fuse_req_t) as their first argument." ] # [ doc = " This handle must be passed to one of the specified reply functions." ] # [ doc = "" ] # [ doc = " This may be done inside the method invocation, or after the call" ] # [ doc = " has returned.  The request handle is valid until one of the reply" ] # [ doc = " functions is called." ] # [ doc = "" ] # [ doc = " Other pointer arguments (name, fuse_file_info, etc) are not valid" ] # [ doc = " after the call has returned, so if they are needed later, their" ] # [ doc = " contents have to be copied." ] # [ doc = "" ] # [ doc = " The filesystem sometimes needs to handle a return value of -ENOENT" ] # [ doc = " from the reply function, which means, that the request was" ] # [ doc = " interrupted, and the reply discarded.  For example if" ] # [ doc = " fuse_reply_open() return -ENOENT means, that the release method for" ] # [ doc = " this file will not be called." ] # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct fuse_lowlevel_ops { # [ doc = " Initialize filesystem" ] # [ doc = "" ] # [ doc = " Called before any other filesystem method" ] # [ doc = "" ] # [ doc = " There's no reply to this function" ] # [ doc = "" ] # [ doc = " @param userdata the user data passed to fuse_lowlevel_new()" ] pub init : :: std :: option :: Option < unsafe extern "C" fn ( userdata : * mut :: std :: os :: raw :: c_void , conn : * mut fuse_conn_info ) > , # [ doc = " Clean up filesystem" ] # [ doc = "" ] # [ doc = " Called on filesystem exit" ] # [ doc = "" ] # [ doc = " There's no reply to this function" ] # [ doc = "" ] # [ doc = " @param userdata the user data passed to fuse_lowlevel_new()" ] pub destroy : :: std :: option :: Option < unsafe extern "C" fn ( userdata : * mut :: std :: os :: raw :: c_void ) > , # [ doc = " Look up a directory entry by name and get its attributes." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_entry" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name the name to look up" ] pub lookup : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Forget about an inode" ] # [ doc = "" ] # [ doc = " This function is called when the kernel removes an inode" ] # [ doc = " from its internal caches." ] # [ doc = "" ] # [ doc = " The inode's lookup count increases by one for every call to" ] # [ doc = " fuse_reply_entry and fuse_reply_create. The nlookup parameter" ] # [ doc = " indicates by how much the lookup count should be decreased." ] # [ doc = "" ] # [ doc = " Inodes with a non-zero lookup count may receive request from" ] # [ doc = " the kernel even after calls to unlink, rmdir or (when" ] # [ doc = " overwriting an existing file) rename. Filesystems must handle" ] # [ doc = " such requests properly and it is recommended to defer removal" ] # [ doc = " of the inode until the lookup count reaches zero. Calls to" ] # [ doc = " unlink, remdir or rename will be followed closely by forget" ] # [ doc = " unless the file or directory is open, in which case the" ] # [ doc = " kernel issues forget only after the release or releasedir" ] # [ doc = " calls." ] # [ doc = "" ] # [ doc = " Note that if a file system will be exported over NFS the" ] # [ doc = " inodes lifetime must extend even beyond forget. See the" ] # [ doc = " generation field in struct fuse_entry_param above." ] # [ doc = "" ] # [ doc = " On unmount the lookup count for all inodes implicitly drops" ] # [ doc = " to zero. It is not guaranteed that the file system will" ] # [ doc = " receive corresponding forget messages for the affected" ] # [ doc = " inodes." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_none" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param nlookup the number of lookups to forget" ] pub forget : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , nlookup : :: std :: os :: raw :: c_ulong ) > , # [ doc = " Get file attributes" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_attr" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi for future use, currently always NULL" ] pub getattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Set file attributes" ] # [ doc = "" ] # [ doc = " In the 'attr' argument only members indicated by the 'to_set'" ] # [ doc = " bitmask contain valid values.  Other members contain undefined" ] # [ doc = " values." ] # [ doc = "" ] # [ doc = " If the setattr was invoked from the ftruncate() system call" ] # [ doc = " under Linux kernel versions 2.6.15 or later, the fi->fh will" ] # [ doc = " contain the value set by the open method or will be undefined" ] # [ doc = " if the open method didn't set any value.  Otherwise (not" ] # [ doc = " ftruncate call, or kernel version earlier than 2.6.15) the fi" ] # [ doc = " parameter will be NULL." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_attr" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param attr the attributes" ] # [ doc = " @param to_set bit mask of attributes which should be set" ] # [ doc = " @param fi file information, or NULL" ] # [ doc = "" ] # [ doc = " Changed in version 2.5:" ] # [ doc = "     file information filled in for ftruncate" ] pub setattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , attr : * mut stat , to_set : :: std :: os :: raw :: c_int , fi : * mut fuse_file_info ) > , # [ doc = " Read symbolic link" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_readlink" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] pub readlink : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t ) > , # [ doc = " Create file node" ] # [ doc = "" ] # [ doc = " Create a regular file, character device, block device, fifo or" ] # [ doc = " socket node." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_entry" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to create" ] # [ doc = " @param mode file type and mode with which to create the new file" ] # [ doc = " @param rdev the device number (only valid if created file is a device)" ] pub mknod : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , mode : mode_t , rdev : dev_t ) > , # [ doc = " Create a directory" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_entry" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to create" ] # [ doc = " @param mode with which to create the new file" ] pub mkdir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , mode : mode_t ) > , # [ doc = " Remove a file" ] # [ doc = "" ] # [ doc = " If the file's inode's lookup count is non-zero, the file" ] # [ doc = " system is expected to postpone any removal of the inode" ] # [ doc = " until the lookup count reaches zero (see description of the" ] # [ doc = " forget function)." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to remove" ] pub unlink : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Remove a directory" ] # [ doc = "" ] # [ doc = " If the directory's inode's lookup count is non-zero, the" ] # [ doc = " file system is expected to postpone any removal of the" ] # [ doc = " inode until the lookup count reaches zero (see description" ] # [ doc = " of the forget function)." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to remove" ] pub rmdir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Create a symbolic link" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_entry" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param link the contents of the symbolic link" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to create" ] pub symlink : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , link : * const :: std :: os :: raw :: c_char , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Rename a file" ] # [ doc = "" ] # [ doc = " If the target exists it should be atomically replaced. If" ] # [ doc = " the target's inode's lookup count is non-zero, the file" ] # [ doc = " system is expected to postpone any removal of the inode" ] # [ doc = " until the lookup count reaches zero (see description of the" ] # [ doc = " forget function)." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the old parent directory" ] # [ doc = " @param name old name" ] # [ doc = " @param newparent inode number of the new parent directory" ] # [ doc = " @param newname new name" ] pub rename : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , newparent : fuse_ino_t , newname : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Create a hard link" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_entry" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the old inode number" ] # [ doc = " @param newparent inode number of the new parent directory" ] # [ doc = " @param newname new name to create" ] pub link : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , newparent : fuse_ino_t , newname : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Open a file" ] # [ doc = "" ] # [ doc = " Open flags (with the exception of O_CREAT, O_EXCL, O_NOCTTY and" ] # [ doc = " O_TRUNC) are available in fi->flags." ] # [ doc = "" ] # [ doc = " Filesystem may store an arbitrary file handle (pointer, index," ] # [ doc = " etc) in fi->fh, and use this in other all other file operations" ] # [ doc = " (read, write, flush, release, fsync)." ] # [ doc = "" ] # [ doc = " Filesystem may also implement stateless file I/O and not store" ] # [ doc = " anything in fi->fh." ] # [ doc = "" ] # [ doc = " There are also some flags (direct_io, keep_cache) which the" ] # [ doc = " filesystem may set in fi, to change the way the file is opened." ] # [ doc = " See fuse_file_info structure in <fuse_common.h> for more details." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_open" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] pub open : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Read data" ] # [ doc = "" ] # [ doc = " Read should send exactly the number of bytes requested except" ] # [ doc = " on EOF or error, otherwise the rest of the data will be" ] # [ doc = " substituted with zeroes.  An exception to this is when the file" ] # [ doc = " has been opened in 'direct_io' mode, in which case the return" ] # [ doc = " value of the read system call will reflect the return value of" ] # [ doc = " this operation." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the open method, or will" ] # [ doc = " be undefined if the open method didn't set any value." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_buf" ] # [ doc = "   fuse_reply_iov" ] # [ doc = "   fuse_reply_data" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param size number of bytes to read" ] # [ doc = " @param off offset to read from" ] # [ doc = " @param fi file information" ] pub read : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , size : usize , off : off_t , fi : * mut fuse_file_info ) > , # [ doc = " Write data" ] # [ doc = "" ] # [ doc = " Write should return exactly the number of bytes requested" ] # [ doc = " except on error.  An exception to this is when the file has" ] # [ doc = " been opened in 'direct_io' mode, in which case the return value" ] # [ doc = " of the write system call will reflect the return value of this" ] # [ doc = " operation." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the open method, or will" ] # [ doc = " be undefined if the open method didn't set any value." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_write" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param buf data to write" ] # [ doc = " @param size number of bytes to write" ] # [ doc = " @param off offset to write to" ] # [ doc = " @param fi file information" ] pub write : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , buf : * const :: std :: os :: raw :: c_char , size : usize , off : off_t , fi : * mut fuse_file_info ) > , # [ doc = " Flush method" ] # [ doc = "" ] # [ doc = " This is called on each close() of the opened file." ] # [ doc = "" ] # [ doc = " Since file descriptors can be duplicated (dup, dup2, fork), for" ] # [ doc = " one open call there may be many flush calls." ] # [ doc = "" ] # [ doc = " Filesystems shouldn't assume that flush will always be called" ] # [ doc = " after some writes, or that if will be called at all." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the open method, or will" ] # [ doc = " be undefined if the open method didn't set any value." ] # [ doc = "" ] # [ doc = " NOTE: the name of the method is misleading, since (unlike" ] # [ doc = " fsync) the filesystem is not forced to flush pending writes." ] # [ doc = " One reason to flush data, is if the filesystem wants to return" ] # [ doc = " write errors." ] # [ doc = "" ] # [ doc = " If the filesystem supports file locking operations (setlk," ] # [ doc = " getlk) it should remove all locks belonging to 'fi->owner'." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] pub flush : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Release an open file" ] # [ doc = "" ] # [ doc = " Release is called when there are no more references to an open" ] # [ doc = " file: all file descriptors are closed and all memory mappings" ] # [ doc = " are unmapped." ] # [ doc = "" ] # [ doc = " For every open call there will be exactly one release call." ] # [ doc = "" ] # [ doc = " The filesystem may reply with an error, but error values are" ] # [ doc = " not returned to close() or munmap() which triggered the" ] # [ doc = " release." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the open method, or will" ] # [ doc = " be undefined if the open method didn't set any value." ] # [ doc = " fi->flags will contain the same flags as for open." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] pub release : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Synchronize file contents" ] # [ doc = "" ] # [ doc = " If the datasync parameter is non-zero, then only the user data" ] # [ doc = " should be flushed, not the meta data." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param datasync flag indicating if only data should be flushed" ] # [ doc = " @param fi file information" ] pub fsync : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , datasync : :: std :: os :: raw :: c_int , fi : * mut fuse_file_info ) > , # [ doc = " Open a directory" ] # [ doc = "" ] # [ doc = " Filesystem may store an arbitrary file handle (pointer, index," ] # [ doc = " etc) in fi->fh, and use this in other all other directory" ] # [ doc = " stream operations (readdir, releasedir, fsyncdir)." ] # [ doc = "" ] # [ doc = " Filesystem may also implement stateless directory I/O and not" ] # [ doc = " store anything in fi->fh, though that makes it impossible to" ] # [ doc = " implement standard conforming directory stream operations in" ] # [ doc = " case the contents of the directory can change between opendir" ] # [ doc = " and releasedir." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_open" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] pub opendir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Read directory" ] # [ doc = "" ] # [ doc = " Send a buffer filled using fuse_add_direntry(), with size not" ] # [ doc = " exceeding the requested size.  Send an empty buffer on end of" ] # [ doc = " stream." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the opendir method, or" ] # [ doc = " will be undefined if the opendir method didn't set any value." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_buf" ] # [ doc = "   fuse_reply_data" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param size maximum number of bytes to send" ] # [ doc = " @param off offset to continue reading the directory stream" ] # [ doc = " @param fi file information" ] pub readdir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , size : usize , off : off_t , fi : * mut fuse_file_info ) > , # [ doc = " Release an open directory" ] # [ doc = "" ] # [ doc = " For every opendir call there will be exactly one releasedir" ] # [ doc = " call." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the opendir method, or" ] # [ doc = " will be undefined if the opendir method didn't set any value." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] pub releasedir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info ) > , # [ doc = " Synchronize directory contents" ] # [ doc = "" ] # [ doc = " If the datasync parameter is non-zero, then only the directory" ] # [ doc = " contents should be flushed, not the meta data." ] # [ doc = "" ] # [ doc = " fi->fh will contain the value set by the opendir method, or" ] # [ doc = " will be undefined if the opendir method didn't set any value." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param datasync flag indicating if only data should be flushed" ] # [ doc = " @param fi file information" ] pub fsyncdir : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , datasync : :: std :: os :: raw :: c_int , fi : * mut fuse_file_info ) > , # [ doc = " Get file system statistics" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_statfs" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number, zero means \"undefined\"" ] pub statfs : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t ) > , # [ doc = " Set an extended attribute" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] pub setxattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char , size : usize , flags : :: std :: os :: raw :: c_int ) > , # [ doc = " Get an extended attribute" ] # [ doc = "" ] # [ doc = " If size is zero, the size of the value should be sent with" ] # [ doc = " fuse_reply_xattr." ] # [ doc = "" ] # [ doc = " If the size is non-zero, and the value fits in the buffer, the" ] # [ doc = " value should be sent with fuse_reply_buf." ] # [ doc = "" ] # [ doc = " If the size is too small for the value, the ERANGE error should" ] # [ doc = " be sent." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_buf" ] # [ doc = "   fuse_reply_data" ] # [ doc = "   fuse_reply_xattr" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param name of the extended attribute" ] # [ doc = " @param size maximum size of the value to send" ] pub getxattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , size : usize ) > , # [ doc = " List extended attribute names" ] # [ doc = "" ] # [ doc = " If size is zero, the total size of the attribute list should be" ] # [ doc = " sent with fuse_reply_xattr." ] # [ doc = "" ] # [ doc = " If the size is non-zero, and the null character separated" ] # [ doc = " attribute list fits in the buffer, the list should be sent with" ] # [ doc = " fuse_reply_buf." ] # [ doc = "" ] # [ doc = " If the size is too small for the list, the ERANGE error should" ] # [ doc = " be sent." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_buf" ] # [ doc = "   fuse_reply_data" ] # [ doc = "   fuse_reply_xattr" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param size maximum size of the list to send" ] pub listxattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , size : usize ) > , # [ doc = " Remove an extended attribute" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param name of the extended attribute" ] pub removexattr : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , name : * const :: std :: os :: raw :: c_char ) > , # [ doc = " Check file access permissions" ] # [ doc = "" ] # [ doc = " This will be called for the access() system call.  If the" ] # [ doc = " 'default_permissions' mount option is given, this method is not" ] # [ doc = " called." ] # [ doc = "" ] # [ doc = " This method is not called under Linux kernel versions 2.4.x" ] # [ doc = "" ] # [ doc = " Introduced in version 2.5" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param mask requested access mode" ] pub access : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , mask : :: std :: os :: raw :: c_int ) > , # [ doc = " Create and open a file" ] # [ doc = "" ] # [ doc = " If the file does not exist, first create it with the specified" ] # [ doc = " mode, and then open it." ] # [ doc = "" ] # [ doc = " Open flags (with the exception of O_NOCTTY) are available in" ] # [ doc = " fi->flags." ] # [ doc = "" ] # [ doc = " Filesystem may store an arbitrary file handle (pointer, index," ] # [ doc = " etc) in fi->fh, and use this in other all other file operations" ] # [ doc = " (read, write, flush, release, fsync)." ] # [ doc = "" ] # [ doc = " There are also some flags (direct_io, keep_cache) which the" ] # [ doc = " filesystem may set in fi, to change the way the file is opened." ] # [ doc = " See fuse_file_info structure in <fuse_common.h> for more details." ] # [ doc = "" ] # [ doc = " If this method is not implemented or under Linux kernel" ] # [ doc = " versions earlier than 2.6.15, the mknod() and open() methods" ] # [ doc = " will be called instead." ] # [ doc = "" ] # [ doc = " Introduced in version 2.5" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_create" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param parent inode number of the parent directory" ] # [ doc = " @param name to create" ] # [ doc = " @param mode file type and mode with which to create the new file" ] # [ doc = " @param fi file information" ] pub create : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , mode : mode_t , fi : * mut fuse_file_info ) > , # [ doc = " Test for a POSIX file lock" ] # [ doc = "" ] # [ doc = " Introduced in version 2.6" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_lock" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] # [ doc = " @param lock the region/type to test" ] pub getlk : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info , lock : * mut flock ) > , # [ doc = " Acquire, modify or release a POSIX file lock" ] # [ doc = "" ] # [ doc = " For POSIX threads (NPTL) there's a 1-1 relation between pid and" ] # [ doc = " owner, but otherwise this is not always the case.  For checking" ] # [ doc = " lock ownership, 'fi->owner' must be used.  The l_pid field in" ] # [ doc = " 'struct flock' should only be used to fill in this field in" ] # [ doc = " getlk()." ] # [ doc = "" ] # [ doc = " Note: if the locking methods are not implemented, the kernel" ] # [ doc = " will still allow file locking to work locally.  Hence these are" ] # [ doc = " only interesting for network filesystems and similar." ] # [ doc = "" ] # [ doc = " Introduced in version 2.6" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] # [ doc = " @param lock the region/type to set" ] # [ doc = " @param sleep locking operation may sleep" ] pub setlk : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info , lock : * mut flock , sleep : :: std :: os :: raw :: c_int ) > , # [ doc = " Map block index within file to block index within device" ] # [ doc = "" ] # [ doc = " Note: This makes sense only for block device backed filesystems" ] # [ doc = " mounted with the 'blkdev' option" ] # [ doc = "" ] # [ doc = " Introduced in version 2.6" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_bmap" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param blocksize unit of block index" ] # [ doc = " @param idx block index within file" ] pub bmap : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , blocksize : usize , idx : u64 ) > , # [ doc = " Ioctl" ] # [ doc = "" ] # [ doc = " Note: For unrestricted ioctls (not allowed for FUSE" ] # [ doc = " servers), data in and out areas can be discovered by giving" ] # [ doc = " iovs and setting FUSE_IOCTL_RETRY in @flags.  For" ] # [ doc = " restricted ioctls, kernel prepares in/out data area" ] # [ doc = " according to the information encoded in cmd." ] # [ doc = "" ] # [ doc = " Introduced in version 2.8" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_ioctl_retry" ] # [ doc = "   fuse_reply_ioctl" ] # [ doc = "   fuse_reply_ioctl_iov" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param cmd ioctl command" ] # [ doc = " @param arg ioctl argument" ] # [ doc = " @param fi file information" ] # [ doc = " @param flags for FUSE_IOCTL_* flags" ] # [ doc = " @param in_buf data fetched from the caller" ] # [ doc = " @param in_bufsz number of fetched bytes" ] # [ doc = " @param out_bufsz maximum size of output data" ] pub ioctl : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , cmd : :: std :: os :: raw :: c_int , arg : * mut :: std :: os :: raw :: c_void , fi : * mut fuse_file_info , flags : :: std :: os :: raw :: c_uint , in_buf : * const :: std :: os :: raw :: c_void , in_bufsz : usize , out_bufsz : usize ) > , # [ doc = " Poll for IO readiness" ] # [ doc = "" ] # [ doc = " Introduced in version 2.8" ] # [ doc = "" ] # [ doc = " Note: If ph is non-NULL, the client should notify" ] # [ doc = " when IO readiness events occur by calling" ] # [ doc = " fuse_lowelevel_notify_poll() with the specified ph." ] # [ doc = "" ] # [ doc = " Regardless of the number of times poll with a non-NULL ph" ] # [ doc = " is received, single notification is enough to clear all." ] # [ doc = " Notifying more times incurs overhead but doesn't harm" ] # [ doc = " correctness." ] # [ doc = "" ] # [ doc = " The callee is responsible for destroying ph with" ] # [ doc = " fuse_pollhandle_destroy() when no longer in use." ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_poll" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] # [ doc = " @param ph poll handle to be used for notification" ] pub poll : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info , ph : * mut fuse_pollhandle ) > , # [ doc = " Write data made available in a buffer" ] # [ doc = "" ] # [ doc = " This is a more generic version of the ->write() method.  If" ] # [ doc = " FUSE_CAP_SPLICE_READ is set in fuse_conn_info.want and the" ] # [ doc = " kernel supports splicing from the fuse device, then the" ] # [ doc = " data will be made available in pipe for supporting zero" ] # [ doc = " copy data transfer." ] # [ doc = "" ] # [ doc = " buf->count is guaranteed to be one (and thus buf->idx is" ] # [ doc = " always zero). The write_buf handler must ensure that" ] # [ doc = " bufv->off is correctly updated (reflecting the number of" ] # [ doc = " bytes read from bufv->buf[0])." ] # [ doc = "" ] # [ doc = " Introduced in version 2.9" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_write" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param bufv buffer containing the data" ] # [ doc = " @param off offset to write to" ] # [ doc = " @param fi file information" ] pub write_buf : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , bufv : * mut fuse_bufvec , off : off_t , fi : * mut fuse_file_info ) > , # [ doc = " Callback function for the retrieve request" ] # [ doc = "" ] # [ doc = " Introduced in version 2.9" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "\tfuse_reply_none" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param cookie user data supplied to fuse_lowlevel_notify_retrieve()" ] # [ doc = " @param ino the inode number supplied to fuse_lowlevel_notify_retrieve()" ] # [ doc = " @param offset the offset supplied to fuse_lowlevel_notify_retrieve()" ] # [ doc = " @param bufv the buffer containing the returned data" ] pub retrieve_reply : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , cookie : * mut :: std :: os :: raw :: c_void , ino : fuse_ino_t , offset : off_t , bufv : * mut fuse_bufvec ) > , # [ doc = " Forget about multiple inodes" ] # [ doc = "" ] # [ doc = " See description of the forget function for more" ] # [ doc = " information." ] # [ doc = "" ] # [ doc = " Introduced in version 2.9" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_none" ] # [ doc = "" ] # [ doc = " @param req request handle" ] pub forget_multi : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , count : usize , forgets : * mut fuse_forget_data ) > , # [ doc = " Acquire, modify or release a BSD file lock" ] # [ doc = "" ] # [ doc = " Note: if the locking methods are not implemented, the kernel" ] # [ doc = " will still allow file locking to work locally.  Hence these are" ] # [ doc = " only interesting for network filesystems and similar." ] # [ doc = "" ] # [ doc = " Introduced in version 2.9" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param fi file information" ] # [ doc = " @param op the locking operation, see flock(2)" ] pub flock : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , fi : * mut fuse_file_info , op : :: std :: os :: raw :: c_int ) > , # [ doc = " Allocate requested space. If this function returns success then" ] # [ doc = " subsequent writes to the specified range shall not fail due to the lack" ] # [ doc = " of free space on the file system storage media." ] # [ doc = "" ] # [ doc = " Introduced in version 2.9" ] # [ doc = "" ] # [ doc = " Valid replies:" ] # [ doc = "   fuse_reply_err" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param offset starting point for allocated region" ] # [ doc = " @param length size of allocated region" ] # [ doc = " @param mode determines the operation to be performed on the given range," ] # [ doc = "             see fallocate(2)" ] pub fallocate : :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , ino : fuse_ino_t , mode : :: std :: os :: raw :: c_int , offset : off_t , length : off_t , fi : * mut fuse_file_info ) > , } # [ test ] fn bindgen_test_layout_fuse_lowlevel_ops ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_lowlevel_ops > ( ) , 328usize , concat ! ( "Size of: " , stringify ! ( fuse_lowlevel_ops ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_lowlevel_ops > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_lowlevel_ops ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . init as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . destroy as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( destroy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . lookup as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( lookup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . forget as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( forget ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . getattr as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( getattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . setattr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( setattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . readlink as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( readlink ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . mknod as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( mknod ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . mkdir as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( mkdir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . unlink as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( unlink ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . rmdir as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( rmdir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . symlink as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( symlink ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . rename as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( rename ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . link as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( link ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . open as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( open ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . read as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( read ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . write as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( write ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . flush as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( flush ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . release as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( release ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . fsync as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( fsync ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . opendir as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( opendir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . readdir as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( readdir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . releasedir as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( releasedir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . fsyncdir as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( fsyncdir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . statfs as * const _ as usize } , 192usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( statfs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . setxattr as * const _ as usize } , 200usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( setxattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . getxattr as * const _ as usize } , 208usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( getxattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . listxattr as * const _ as usize } , 216usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( listxattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . removexattr as * const _ as usize } , 224usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( removexattr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . access as * const _ as usize } , 232usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( access ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . create as * const _ as usize } , 240usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( create ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . getlk as * const _ as usize } , 248usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( getlk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . setlk as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( setlk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . bmap as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( bmap ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . ioctl as * const _ as usize } , 272usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( ioctl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . poll as * const _ as usize } , 280usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( poll ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . write_buf as * const _ as usize } , 288usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( write_buf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . retrieve_reply as * const _ as usize } , 296usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( retrieve_reply ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . forget_multi as * const _ as usize } , 304usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( forget_multi ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . flock as * const _ as usize } , 312usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( flock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_lowlevel_ops > ( ) ) ) . fallocate as * const _ as usize } , 320usize , concat ! ( "Offset of field: " , stringify ! ( fuse_lowlevel_ops ) , "::" , stringify ! ( fallocate ) ) ) ; } extern "C" { # [ doc = " Reply with an error code or success" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   all except forget" ] # [ doc = "" ] # [ doc = " unlink, rmdir, rename, flush, release, fsync, fsyncdir, setxattr," ] # [ doc = " removexattr and setlk may send a zero code" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param err the positive error value, or zero for success" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_err ( req : fuse_req_t , err : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Don't send reply" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   forget" ] # [ doc = "" ] # [ doc = " @param req request handle" ] pub fn fuse_reply_none ( req : fuse_req_t ) ; } extern "C" { # [ doc = " Reply with a directory entry" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   lookup, mknod, mkdir, symlink, link" ] # [ doc = "" ] # [ doc = " Side effects:" ] # [ doc = "   increments the lookup count on success" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param e the entry parameters" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_entry ( req : fuse_req_t , e : * const fuse_entry_param ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with a directory entry and open parameters" ] # [ doc = "" ] # [ doc = " currently the following members of 'fi' are used:" ] # [ doc = "   fh, direct_io, keep_cache" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   create" ] # [ doc = "" ] # [ doc = " Side effects:" ] # [ doc = "   increments the lookup count on success" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param e the entry parameters" ] # [ doc = " @param fi file information" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_create ( req : fuse_req_t , e : * const fuse_entry_param , fi : * const fuse_file_info ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with attributes" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   getattr, setattr" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param attr the attributes" ] # [ doc = " @param attr_timeout\tvalidity timeout (in seconds) for the attributes" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_attr ( req : fuse_req_t , attr : * const stat , attr_timeout : f64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with the contents of a symbolic link" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   readlink" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param link symbolic link contents" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_readlink ( req : fuse_req_t , link : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with open parameters" ] # [ doc = "" ] # [ doc = " currently the following members of 'fi' are used:" ] # [ doc = "   fh, direct_io, keep_cache" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   open, opendir" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param fi file information" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_open ( req : fuse_req_t , fi : * const fuse_file_info ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with number of bytes written" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   write" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param count the number of bytes written" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_write ( req : fuse_req_t , count : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with data" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   read, readdir, getxattr, listxattr" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param buf buffer containing data" ] # [ doc = " @param size the size of data in bytes" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_buf ( req : fuse_req_t , buf : * const :: std :: os :: raw :: c_char , size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with data copied/moved from buffer(s)" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   read, readdir, getxattr, listxattr" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param bufv buffer vector" ] # [ doc = " @param flags flags controlling the copy" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_data ( req : fuse_req_t , bufv : * mut fuse_bufvec , flags : fuse_buf_copy_flags ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with data vector" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   read, readdir, getxattr, listxattr" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param iov the vector containing the data" ] # [ doc = " @param count the size of vector" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_iov ( req : fuse_req_t , iov : * const iovec , count : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with filesystem statistics" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   statfs" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param stbuf filesystem statistics" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_statfs ( req : fuse_req_t , stbuf : * const statvfs ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with needed buffer size" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   getxattr, listxattr" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param count the buffer size needed in bytes" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_xattr ( req : fuse_req_t , count : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with file lock information" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   getlk" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param lock the lock information" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_lock ( req : fuse_req_t , lock : * const flock ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with block index" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   bmap" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param idx block index within device" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_bmap ( req : fuse_req_t , idx : u64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add a directory entry to the buffer" ] # [ doc = "" ] # [ doc = " Buffer needs to be large enough to hold the entry.  If it's not," ] # [ doc = " then the entry is not filled in but the size of the entry is still" ] # [ doc = " returned.  The caller can check this by comparing the bufsize" ] # [ doc = " parameter with the returned entry size.  If the entry size is" ] # [ doc = " larger than the buffer size, the operation failed." ] # [ doc = "" ] # [ doc = " From the 'stbuf' argument the st_ino field and bits 12-15 of the" ] # [ doc = " st_mode field are used.  The other fields are ignored." ] # [ doc = "" ] # [ doc = " Note: offsets do not necessarily represent physical offsets, and" ] # [ doc = " could be any marker, that enables the implementation to find a" ] # [ doc = " specific point in the directory stream." ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param buf the point where the new entry will be added to the buffer" ] # [ doc = " @param bufsize remaining size of the buffer" ] # [ doc = " @param name the name of the entry" ] # [ doc = " @param stbuf the file attributes" ] # [ doc = " @param off the offset of the next entry" ] # [ doc = " @return the space needed for the entry" ] pub fn fuse_add_direntry ( req : fuse_req_t , buf : * mut :: std :: os :: raw :: c_char , bufsize : usize , name : * const :: std :: os :: raw :: c_char , stbuf : * const stat , off : off_t ) -> usize ; } extern "C" { # [ doc = " Reply to ask for data fetch and output buffer preparation.  ioctl" ] # [ doc = " will be retried with the specified input data fetched and output" ] # [ doc = " buffer prepared." ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   ioctl" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param in_iov iovec specifying data to fetch from the caller" ] # [ doc = " @param in_count number of entries in in_iov" ] # [ doc = " @param out_iov iovec specifying addresses to write output to" ] # [ doc = " @param out_count number of entries in out_iov" ] # [ doc = " @return zero for success, -errno for failure to send reply" ] pub fn fuse_reply_ioctl_retry ( req : fuse_req_t , in_iov : * const iovec , in_count : usize , out_iov : * const iovec , out_count : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply to finish ioctl" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   ioctl" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param result result to be passed to the caller" ] # [ doc = " @param buf buffer containing output data" ] # [ doc = " @param size length of output data" ] pub fn fuse_reply_ioctl ( req : fuse_req_t , result : :: std :: os :: raw :: c_int , buf : * const :: std :: os :: raw :: c_void , size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply to finish ioctl with iov buffer" ] # [ doc = "" ] # [ doc = " Possible requests:" ] # [ doc = "   ioctl" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param result result to be passed to the caller" ] # [ doc = " @param iov the vector containing the data" ] # [ doc = " @param count the size of vector" ] pub fn fuse_reply_ioctl_iov ( req : fuse_req_t , result : :: std :: os :: raw :: c_int , iov : * const iovec , count : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Reply with poll result event mask" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param revents poll result event mask" ] pub fn fuse_reply_poll ( req : fuse_req_t , revents : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Notify IO readiness event" ] # [ doc = "" ] # [ doc = " For more information, please read comment for poll operation." ] # [ doc = "" ] # [ doc = " @param ph poll handle to notify IO readiness event for" ] pub fn fuse_lowlevel_notify_poll ( ph : * mut fuse_pollhandle ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Notify to invalidate cache for an inode" ] # [ doc = "" ] # [ doc = " @param ch the channel through which to send the invalidation" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param off the offset in the inode where to start invalidating" ] # [ doc = "            or negative to invalidate attributes only" ] # [ doc = " @param len the amount of cache to invalidate or 0 for all" ] # [ doc = " @return zero for success, -errno for failure" ] pub fn fuse_lowlevel_notify_inval_inode ( ch : * mut fuse_chan , ino : fuse_ino_t , off : off_t , len : off_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Notify to invalidate parent attributes and the dentry matching" ] # [ doc = " parent/name" ] # [ doc = "" ] # [ doc = " To avoid a deadlock don't call this function from a filesystem operation and" ] # [ doc = " don't call it with a lock held that can also be held by a filesystem" ] # [ doc = " operation." ] # [ doc = "" ] # [ doc = " @param ch the channel through which to send the invalidation" ] # [ doc = " @param parent inode number" ] # [ doc = " @param name file name" ] # [ doc = " @param namelen strlen() of file name" ] # [ doc = " @return zero for success, -errno for failure" ] pub fn fuse_lowlevel_notify_inval_entry ( ch : * mut fuse_chan , parent : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , namelen : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Notify to invalidate parent attributes and delete the dentry matching" ] # [ doc = " parent/name if the dentry's inode number matches child (otherwise it" ] # [ doc = " will invalidate the matching dentry)." ] # [ doc = "" ] # [ doc = " To avoid a deadlock don't call this function from a filesystem operation and" ] # [ doc = " don't call it with a lock held that can also be held by a filesystem" ] # [ doc = " operation." ] # [ doc = "" ] # [ doc = " @param ch the channel through which to send the notification" ] # [ doc = " @param parent inode number" ] # [ doc = " @param child inode number" ] # [ doc = " @param name file name" ] # [ doc = " @param namelen strlen() of file name" ] # [ doc = " @return zero for success, -errno for failure" ] pub fn fuse_lowlevel_notify_delete ( ch : * mut fuse_chan , parent : fuse_ino_t , child : fuse_ino_t , name : * const :: std :: os :: raw :: c_char , namelen : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Store data to the kernel buffers" ] # [ doc = "" ] # [ doc = " Synchronously store data in the kernel buffers belonging to the" ] # [ doc = " given inode.  The stored data is marked up-to-date (no read will be" ] # [ doc = " performed against it, unless it's invalidated or evicted from the" ] # [ doc = " cache)." ] # [ doc = "" ] # [ doc = " If the stored data overflows the current file size, then the size" ] # [ doc = " is extended, similarly to a write(2) on the filesystem." ] # [ doc = "" ] # [ doc = " If this function returns an error, then the store wasn't fully" ] # [ doc = " completed, but it may have been partially completed." ] # [ doc = "" ] # [ doc = " @param ch the channel through which to send the invalidation" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param offset the starting offset into the file to store to" ] # [ doc = " @param bufv buffer vector" ] # [ doc = " @param flags flags controlling the copy" ] # [ doc = " @return zero for success, -errno for failure" ] pub fn fuse_lowlevel_notify_store ( ch : * mut fuse_chan , ino : fuse_ino_t , offset : off_t , bufv : * mut fuse_bufvec , flags : fuse_buf_copy_flags ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Retrieve data from the kernel buffers" ] # [ doc = "" ] # [ doc = " Retrieve data in the kernel buffers belonging to the given inode." ] # [ doc = " If successful then the retrieve_reply() method will be called with" ] # [ doc = " the returned data." ] # [ doc = "" ] # [ doc = " Only present pages are returned in the retrieve reply.  Retrieving" ] # [ doc = " stops when it finds a non-present page and only data prior to that is" ] # [ doc = " returned." ] # [ doc = "" ] # [ doc = " If this function returns an error, then the retrieve will not be" ] # [ doc = " completed and no reply will be sent." ] # [ doc = "" ] # [ doc = " This function doesn't change the dirty state of pages in the kernel" ] # [ doc = " buffer.  For dirty pages the write() method will be called" ] # [ doc = " regardless of having been retrieved previously." ] # [ doc = "" ] # [ doc = " @param ch the channel through which to send the invalidation" ] # [ doc = " @param ino the inode number" ] # [ doc = " @param size the number of bytes to retrieve" ] # [ doc = " @param offset the starting offset into the file to retrieve from" ] # [ doc = " @param cookie user data to supply to the reply callback" ] # [ doc = " @return zero for success, -errno for failure" ] pub fn fuse_lowlevel_notify_retrieve ( ch : * mut fuse_chan , ino : fuse_ino_t , size : usize , offset : off_t , cookie : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get the userdata from the request" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @return the user data passed to fuse_lowlevel_new()" ] pub fn fuse_req_userdata ( req : fuse_req_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Get the context from the request" ] # [ doc = "" ] # [ doc = " The pointer returned by this function will only be valid for the" ] # [ doc = " request's lifetime" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @return the context structure" ] pub fn fuse_req_ctx ( req : fuse_req_t ) -> * const fuse_ctx ; } extern "C" { # [ doc = " Get the current supplementary group IDs for the specified request" ] # [ doc = "" ] # [ doc = " Similar to the getgroups(2) system call, except the return value is" ] # [ doc = " always the total number of group IDs, even if it is larger than the" ] # [ doc = " specified size." ] # [ doc = "" ] # [ doc = " The current fuse kernel module in linux (as of 2.6.30) doesn't pass" ] # [ doc = " the group list to userspace, hence this function needs to parse" ] # [ doc = " \"/proc/$TID/task/$TID/status\" to get the group IDs." ] # [ doc = "" ] # [ doc = " This feature may not be supported on all operating systems.  In" ] # [ doc = " such a case this function will return -ENOSYS." ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param size size of given array" ] # [ doc = " @param list array of group IDs to be filled in" ] # [ doc = " @return the total number of supplementary group IDs or -errno on failure" ] pub fn fuse_req_getgroups ( req : fuse_req_t , size : :: std :: os :: raw :: c_int , list : * mut gid_t ) -> :: std :: os :: raw :: c_int ; } # [ doc = " Callback function for an interrupt" ] # [ doc = "" ] # [ doc = " @param req interrupted request" ] # [ doc = " @param data user data" ] pub type fuse_interrupt_func_t = :: std :: option :: Option < unsafe extern "C" fn ( req : fuse_req_t , data : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { # [ doc = " Register/unregister callback for an interrupt" ] # [ doc = "" ] # [ doc = " If an interrupt has already happened, then the callback function is" ] # [ doc = " called from within this function, hence it's not possible for" ] # [ doc = " interrupts to be lost." ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @param func the callback function or NULL for unregister" ] # [ doc = " @param data user data passed to the callback function" ] pub fn fuse_req_interrupt_func ( req : fuse_req_t , func : fuse_interrupt_func_t , data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " Check if a request has already been interrupted" ] # [ doc = "" ] # [ doc = " @param req request handle" ] # [ doc = " @return 1 if the request has been interrupted, 0 otherwise" ] pub fn fuse_req_interrupted ( req : fuse_req_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn fuse_lowlevel_is_lib_option ( opt : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Create a low level session" ] # [ doc = "" ] # [ doc = " @param args argument vector" ] # [ doc = " @param op the low level filesystem operations" ] # [ doc = " @param op_size sizeof(struct fuse_lowlevel_ops)" ] # [ doc = " @param userdata user data" ] # [ doc = " @return the created session object, or NULL on failure" ] pub fn fuse_lowlevel_new ( args : * mut fuse_args , op : * const fuse_lowlevel_ops , op_size : usize , userdata : * mut :: std :: os :: raw :: c_void ) -> * mut fuse_session ; } # [ doc = " Session operations" ] # [ doc = "" ] # [ doc = " This is used in session creation" ] # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct fuse_session_ops { # [ doc = " Hook to process a request (mandatory)" ] # [ doc = "" ] # [ doc = " @param data user data passed to fuse_session_new()" ] # [ doc = " @param buf buffer containing the raw request" ] # [ doc = " @param len request length" ] # [ doc = " @param ch channel on which the request was received" ] pub process : :: std :: option :: Option < unsafe extern "C" fn ( data : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_char , len : usize , ch : * mut fuse_chan ) > , # [ doc = " Hook for session exit and reset (optional)" ] # [ doc = "" ] # [ doc = " @param data user data passed to fuse_session_new()" ] # [ doc = " @param val exited status (1 - exited, 0 - not exited)" ] pub exit : :: std :: option :: Option < unsafe extern "C" fn ( data : * mut :: std :: os :: raw :: c_void , val : :: std :: os :: raw :: c_int ) > , # [ doc = " Hook for querying the current exited status (optional)" ] # [ doc = "" ] # [ doc = " @param data user data passed to fuse_session_new()" ] # [ doc = " @return 1 if exited, 0 if not exited" ] pub exited : :: std :: option :: Option < unsafe extern "C" fn ( data : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , # [ doc = " Hook for cleaning up the channel on destroy (optional)" ] # [ doc = "" ] # [ doc = " @param data user data passed to fuse_session_new()" ] pub destroy : :: std :: option :: Option < unsafe extern "C" fn ( data : * mut :: std :: os :: raw :: c_void ) > , } # [ test ] fn bindgen_test_layout_fuse_session_ops ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_session_ops > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( fuse_session_ops ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_session_ops > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_session_ops ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_session_ops > ( ) ) ) . process as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_session_ops ) , "::" , stringify ! ( process ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_session_ops > ( ) ) ) . exit as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_session_ops ) , "::" , stringify ! ( exit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_session_ops > ( ) ) ) . exited as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_session_ops ) , "::" , stringify ! ( exited ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_session_ops > ( ) ) ) . destroy as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( fuse_session_ops ) , "::" , stringify ! ( destroy ) ) ) ; } extern "C" { # [ doc = " Create a new session" ] # [ doc = "" ] # [ doc = " @param op session operations" ] # [ doc = " @param data user data" ] # [ doc = " @return new session object, or NULL on failure" ] pub fn fuse_session_new ( op : * mut fuse_session_ops , data : * mut :: std :: os :: raw :: c_void ) -> * mut fuse_session ; } extern "C" { # [ doc = " Assign a channel to a session" ] # [ doc = "" ] # [ doc = " Note: currently only a single channel may be assigned.  This may" ] # [ doc = " change in the future" ] # [ doc = "" ] # [ doc = " If a session is destroyed, the assigned channel is also destroyed" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @param ch the channel" ] pub fn fuse_session_add_chan ( se : * mut fuse_session , ch : * mut fuse_chan ) ; } extern "C" { # [ doc = " Remove a channel from a session" ] # [ doc = "" ] # [ doc = " If the channel is not assigned to a session, then this is a no-op" ] # [ doc = "" ] # [ doc = " @param ch the channel to remove" ] pub fn fuse_session_remove_chan ( ch : * mut fuse_chan ) ; } extern "C" { # [ doc = " Iterate over the channels assigned to a session" ] # [ doc = "" ] # [ doc = " The iterating function needs to start with a NULL channel, and" ] # [ doc = " after that needs to pass the previously returned channel to the" ] # [ doc = " function." ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @param ch the previous channel, or NULL" ] # [ doc = " @return the next channel, or NULL if no more channels exist" ] pub fn fuse_session_next_chan ( se : * mut fuse_session , ch : * mut fuse_chan ) -> * mut fuse_chan ; } extern "C" { # [ doc = " Process a raw request" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @param buf buffer containing the raw request" ] # [ doc = " @param len request length" ] # [ doc = " @param ch channel on which the request was received" ] pub fn fuse_session_process ( se : * mut fuse_session , buf : * const :: std :: os :: raw :: c_char , len : usize , ch : * mut fuse_chan ) ; } extern "C" { # [ doc = " Process a raw request supplied in a generic buffer" ] # [ doc = "" ] # [ doc = " This is a more generic version of fuse_session_process().  The" ] # [ doc = " fuse_buf may contain a memory buffer or a pipe file descriptor." ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @param buf the fuse_buf containing the request" ] # [ doc = " @param ch channel on which the request was received" ] pub fn fuse_session_process_buf ( se : * mut fuse_session , buf : * const fuse_buf , ch : * mut fuse_chan ) ; } extern "C" { # [ doc = " Receive a raw request supplied in a generic buffer" ] # [ doc = "" ] # [ doc = " This is a more generic version of fuse_chan_recv().  The fuse_buf" ] # [ doc = " supplied to this function contains a suitably allocated memory" ] # [ doc = " buffer.  This may be overwritten with a file descriptor buffer." ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @param buf the fuse_buf to store the request in" ] # [ doc = " @param chp pointer to the channel" ] # [ doc = " @return the actual size of the raw request, or -errno on error" ] pub fn fuse_session_receive_buf ( se : * mut fuse_session , buf : * mut fuse_buf , chp : * mut * mut fuse_chan ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Destroy a session" ] # [ doc = "" ] # [ doc = " @param se the session" ] pub fn fuse_session_destroy ( se : * mut fuse_session ) ; } extern "C" { # [ doc = " Exit a session" ] # [ doc = "" ] # [ doc = " @param se the session" ] pub fn fuse_session_exit ( se : * mut fuse_session ) ; } extern "C" { # [ doc = " Reset the exited status of a session" ] # [ doc = "" ] # [ doc = " @param se the session" ] pub fn fuse_session_reset ( se : * mut fuse_session ) ; } extern "C" { # [ doc = " Query the exited status of a session" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @return 1 if exited, 0 if not exited" ] pub fn fuse_session_exited ( se : * mut fuse_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get the user data provided to the session" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @return the user data" ] pub fn fuse_session_data ( se : * mut fuse_session ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Enter a single threaded event loop" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn fuse_session_loop ( se : * mut fuse_session ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Enter a multi-threaded event loop" ] # [ doc = "" ] # [ doc = " @param se the session" ] # [ doc = " @return 0 on success, -1 on error" ] pub fn fuse_session_loop_mt ( se : * mut fuse_session ) -> :: std :: os :: raw :: c_int ; } # [ doc = " Channel operations" ] # [ doc = "" ] # [ doc = " This is used in channel creation" ] # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct fuse_chan_ops { # [ doc = " Hook for receiving a raw request" ] # [ doc = "" ] # [ doc = " @param ch pointer to the channel" ] # [ doc = " @param buf the buffer to store the request in" ] # [ doc = " @param size the size of the buffer" ] # [ doc = " @return the actual size of the raw request, or -1 on error" ] pub receive : :: std :: option :: Option < unsafe extern "C" fn ( chp : * mut * mut fuse_chan , buf : * mut :: std :: os :: raw :: c_char , size : usize ) -> :: std :: os :: raw :: c_int > , # [ doc = " Hook for sending a raw reply" ] # [ doc = "" ] # [ doc = " A return value of -ENOENT means, that the request was" ] # [ doc = " interrupted, and the reply was discarded" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @param iov vector of blocks" ] # [ doc = " @param count the number of blocks in vector" ] # [ doc = " @return zero on success, -errno on failure" ] pub send : :: std :: option :: Option < unsafe extern "C" fn ( ch : * mut fuse_chan , iov : * const iovec , count : usize ) -> :: std :: os :: raw :: c_int > , # [ doc = " Destroy the channel" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] pub destroy : :: std :: option :: Option < unsafe extern "C" fn ( ch : * mut fuse_chan ) > , } # [ test ] fn bindgen_test_layout_fuse_chan_ops ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fuse_chan_ops > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( fuse_chan_ops ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fuse_chan_ops > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fuse_chan_ops ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_chan_ops > ( ) ) ) . receive as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( fuse_chan_ops ) , "::" , stringify ! ( receive ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_chan_ops > ( ) ) ) . send as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( fuse_chan_ops ) , "::" , stringify ! ( send ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fuse_chan_ops > ( ) ) ) . destroy as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( fuse_chan_ops ) , "::" , stringify ! ( destroy ) ) ) ; } extern "C" { # [ doc = " Create a new channel" ] # [ doc = "" ] # [ doc = " @param op channel operations" ] # [ doc = " @param fd file descriptor of the channel" ] # [ doc = " @param bufsize the minimal receive buffer size" ] # [ doc = " @param data user data" ] # [ doc = " @return the new channel object, or NULL on failure" ] pub fn fuse_chan_new ( op : * mut fuse_chan_ops , fd : :: std :: os :: raw :: c_int , bufsize : usize , data : * mut :: std :: os :: raw :: c_void ) -> * mut fuse_chan ; } extern "C" { # [ doc = " Query the file descriptor of the channel" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @return the file descriptor passed to fuse_chan_new()" ] pub fn fuse_chan_fd ( ch : * mut fuse_chan ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Query the minimal receive buffer size" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @return the buffer size passed to fuse_chan_new()" ] pub fn fuse_chan_bufsize ( ch : * mut fuse_chan ) -> usize ; } extern "C" { # [ doc = " Query the user data" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @return the user data passed to fuse_chan_new()" ] pub fn fuse_chan_data ( ch : * mut fuse_chan ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Query the session to which this channel is assigned" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @return the session, or NULL if the channel is not assigned" ] pub fn fuse_chan_session ( ch : * mut fuse_chan ) -> * mut fuse_session ; } extern "C" { # [ doc = " Receive a raw request" ] # [ doc = "" ] # [ doc = " A return value of -ENODEV means, that the filesystem was unmounted" ] # [ doc = "" ] # [ doc = " @param ch pointer to the channel" ] # [ doc = " @param buf the buffer to store the request in" ] # [ doc = " @param size the size of the buffer" ] # [ doc = " @return the actual size of the raw request, or -errno on error" ] pub fn fuse_chan_recv ( ch : * mut * mut fuse_chan , buf : * mut :: std :: os :: raw :: c_char , size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Send a raw reply" ] # [ doc = "" ] # [ doc = " A return value of -ENOENT means, that the request was" ] # [ doc = " interrupted, and the reply was discarded" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] # [ doc = " @param iov vector of blocks" ] # [ doc = " @param count the number of blocks in vector" ] # [ doc = " @return zero on success, -errno on failure" ] pub fn fuse_chan_send ( ch : * mut fuse_chan , iov : * const iovec , count : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Destroy a channel" ] # [ doc = "" ] # [ doc = " @param ch the channel" ] pub fn fuse_chan_destroy ( ch : * mut fuse_chan ) ; }