KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Name Manager

Abstract Module System for KOS's VFS. More...

Modules

 Handler Types
 Name handler types.
 

Files

file  nmmgr.h
 Name manager.
 

Data Structures

struct  nmmgr_handler_t
 Name handler interface. More...
 
struct  alias_handler_t
 Alias handler interface. More...
 

Macros

#define NMMGR_LIST_INIT   { NULL }
 List entry initializer for static structs.
 
#define NMMGR_FLAGS_NEEDSFREE   0x00000001
 This structure must be freed when removed.
 
#define NMMGR_FLAGS_INDEV   0x00000002
 This structure maps into /dev/.
 
#define NMMGR_FLAGS_ALIAS   0x00000004
 This structure aliases another.
 

Functions

typedef LIST_HEAD (nmmgr_list, nmmgr_handler) nmmgr_list_t
 Name handler list type.
 
nmmgr_handler_tnmmgr_lookup (const char *name)
 Retrieve a name handler by name.
 
nmmgr_list_t * nmmgr_get_list (void)
 Get the head element of the name list.
 
int nmmgr_handler_add (nmmgr_handler_t *hnd)
 Add a name handler.
 
int nmmgr_handler_remove (nmmgr_handler_t *hnd)
 Remove a name handler.
 

Detailed Description

Abstract Module System for KOS's VFS.

Macro Definition Documentation

◆ NMMGR_FLAGS_ALIAS

#define NMMGR_FLAGS_ALIAS   0x00000004

This structure aliases another.

◆ NMMGR_FLAGS_INDEV

#define NMMGR_FLAGS_INDEV   0x00000002

This structure maps into /dev/.

◆ NMMGR_FLAGS_NEEDSFREE

#define NMMGR_FLAGS_NEEDSFREE   0x00000001

This structure must be freed when removed.

◆ NMMGR_LIST_INIT

#define NMMGR_LIST_INIT   { NULL }

List entry initializer for static structs.

If you are creating nmmgr handlers, this is what you should initialize the list_ent member with.

Function Documentation

◆ LIST_HEAD()

typedef LIST_HEAD ( nmmgr_list  ,
nmmgr_handler   
)

Name handler list type.

Contrary to what doxygen may think, this is not a function.

◆ nmmgr_get_list()

nmmgr_list_t * nmmgr_get_list ( void  )

Get the head element of the name list.

Warning
DO NOT MODIFY THE VALUE RETURNED BY THIS FUNCTION! In fact, don't ever call this function.
Returns
The head of the name handler list

◆ nmmgr_handler_add()

int nmmgr_handler_add ( nmmgr_handler_t hnd)

Add a name handler.

This function adds a new name handler to the list in the kernel.

Parameters
hndThe handler to add
Return values
0On success

◆ nmmgr_handler_remove()

int nmmgr_handler_remove ( nmmgr_handler_t hnd)

Remove a name handler.

This function removes a name handler from the list in the kernel.

Parameters
hndThe handler to remove
Return values
0On success
-1If the handler wasn't found

◆ nmmgr_lookup()

nmmgr_handler_t * nmmgr_lookup ( const char *  name)

Retrieve a name handler by name.

This function will retrieve a name handler by its pathname.

Parameters
nameThe handler to look up
Returns
The handler, or NULL on failure.