mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 05:11:15 +08:00
NSDISPATCH(3): Add rtems_nss_register_module()
This commit is contained in:
@@ -215,7 +215,9 @@ typedef struct _ns_mod {
|
||||
void *handle; /* handle from dlopen */
|
||||
ns_mtab *mtab; /* method table */
|
||||
unsigned int mtabsize; /* count of entries in method table */
|
||||
#ifndef __rtems__
|
||||
nss_module_unregister_fn unregister; /* called to unload module */
|
||||
#endif /* __rtems__ */
|
||||
} ns_mod;
|
||||
|
||||
#endif /* _NS_PRIVATE */
|
||||
@@ -238,6 +240,22 @@ extern int _nsyylineno;
|
||||
extern void _nsdbtdump(const ns_dbt *);
|
||||
#endif
|
||||
#endif /* _NS_PRIVATE */
|
||||
#ifdef __rtems__
|
||||
/**
|
||||
* @brief Registers a name service module.
|
||||
*
|
||||
* @param[in] source The source identifier.
|
||||
* @param[in] mtab The module table. This table will be claimed by the name
|
||||
* service dispatcher.
|
||||
* @param[in] mtabsize The module table entry count.
|
||||
*
|
||||
* @retval 0 Successful operation.
|
||||
* @retval -1 An error occurred. The errno is set to indicate the error.
|
||||
*/
|
||||
int
|
||||
rtems_nss_register_module(const char *source, ns_mtab *mtab,
|
||||
unsigned int mtabsize);
|
||||
#endif /* __rtems__ */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user