aboutsummaryrefslogtreecommitdiff
path: root/libnetfs/trans-callback.c
Commit message (Collapse)AuthorAgeFilesLines
* Homogeneize [gs]et_translator and get_dire[nc]ts into mach_msg_type_number_tSamuel Thibault2023-08-081-1/+1
| | | | | | | | | | | | | | | | | This makes netfs_[gs]et_translator use mach_msg_type_number_t like the RPC and diskfs. This also makes the fshelp_fetch_root_callback1_t for fshelp_fetch_root use mach_msg_type_number_t. This also makes procfs_get_translator and the get_translator proc method use mach_msg_type_number_t. This makes diskfs_get_directs use mach_msg_type_number_t like the dir_readdir RPC Also get rid of u_int. This notably fixes _diskfs_translator_callback1_fn's bogus cast of size_t *argz_len into (u_int *).
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-1/+1
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* Unify the short-circuit translator logicJustus Winter2016-05-191-1/+3
| | | | | | | | | | | | | | | * libdiskfs/dir-lookup.c (short_circuited_callback1): Move function to libfshelp. (diskfs_S_dir_lookup): Use the function from libfshelp instead. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Adapt accordingly. * libdiskfs/trans-callback.c (_diskfs_translator_callback2_fn): Likewise. * libfshelp/fetch-root.c (fshelp_short_circuited_callback1): New function. * libfshelp/fshelp.h (struct fshelp_stat_cookie): New definition. (fshelp_short_circuited_callback1): New prototype. * libnetfs/dir-lookup.c (short_circuited_callback1): Drop function. (netfs_S_dir_lookup): Use the function from libfshelp instead. * libnetfs/fsys-getroot.c (netfs_S_fsys_getroot): Adapt accordingly. * libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Likewise.
* Fixed leaks in _netfs_translator_callback2_fnJames Clarke2016-02-081-2/+8
| | | | | * libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Fixed leaking iouser and peropen structs on error.
* Check for a return value in netfs_make_peropen before using it in ↵Flavio Cruz2016-02-071-2/+6
| | | | | | netfs_make_protid. * libnetfs/trans-callback.c: Add check for netfs_make_peropen.
* libnetfs: fix memory leakJustus Winter2014-05-311-1/+4
| | | | | * libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Free user if creating the protid failed.
* 2002-05-11 Roland McGrath <roland@frob.com>Roland McGrath2002-05-121-2/+5
| | | | | * trans-callback.c (_netfs_translator_callback1_fn): Add an assert that netfs_get_translator not fail with EOPNOTSUPP.
* 2001-04-01 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-06-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | * dir-lookup.c (netfs_S_dir_lookup): Use iohelp_create_empty_iouser. Use iohelp_dup_iouser as per the new semantics. * dir-mkfile.c (netfs_S_dir_mkfile): Use iohelp_dup_iouser as per the new semantics. * file-exec.c (netfs_S_file_exec): Likewise. * file-reparent.c (netfs_S_file_reparent): Likewise. * fsys-getroot.c (netfs_S_fsys_getroot): Use iohelp_create_complex_iouser. * fsys-syncfs.c (netfs_S_fsys_syncfs): Use iohelp_create_simple_iouser. * io-duplicate.c (netfs_S_io_duplicate): Use iohelp_dup_iouser as per the new semantics. * io-reauthenticate.c (netfs_S_io_reauthenticate): Use iohelp_reauth as per the new semantics. * io-restric-auth.c (netfs_S_io_restric_auth): Use iohelp_create_complex_iouser. Check return values. * trans-callback.c (_netfs_transcallback2_fn): Use iohelp_create_simple_iouser.
* Initial checkinMiles Bader1997-06-201-0/+79