table of contents
| mount.c(3elektra) | Elektra | mount.c(3elektra) |
NAME¶
mount.c - Interna of mount functionality.
SYNOPSIS¶
#include 'kdbinternal.h'
Functions¶
int mountOpen (KDB *kdb, KeySet *config, KeySet *modules,
Key *errorKey)
Creates a trie from a given configuration. int mountDefault (KDB *kdb,
KeySet *modules, int inFallback, Key *errorKey)
Reopens the default backend and mounts the default backend if needed. int
mountModules (KDB *kdb, KeySet *modules, Key *errorKey)
Mount all module configurations. int mountVersion (KDB *kdb, Key
*errorKey)
Mount the version backend. int mountBackend (KDB *kdb, Backend
*backend, Key *errorKey)
Mounts a backend into the trie. Key * mountGetMountpoint (KDB *handle,
const Key *where)
Lookup a mountpoint in a handle for a specific key. " Backend *
mountGetBackend (KDB *handle, const Key *key)
Lookup a backend handle for a specific key.
Detailed Description¶
Interna of mount functionality.
Copyright:
Function Documentation¶
int mountBackend (KDB * kdb, Backend * backend, Key * errorKey)¶
Mounts a backend into the trie.
Precondition:
Postcondition:
Warning:
Parameters:
backend the backend to mount
errorKey the key used to report warnings
Return values:
1 on success
int mountDefault (KDB * kdb, KeySet * modules, int inFallback, Key * errorKey)¶
Reopens the default backend and mounts the default backend if needed.
Precondition:
Parameters:
modules the current list of loaded modules
errorKey the key used to report warnings
Return values:
0 on success
Backend* mountGetBackend (KDB * handle, const Key * key)¶
Lookup a backend handle for a specific key. The required canonical name is ensured by using a key as parameter, which will transform the key to canonical representation.
Will return handle when no more specific KDB could be found.
If key is 0 or invalid the default backend will be returned.
Parameters:
key the key, that should be looked up.
Returns:
Key* mountGetMountpoint (KDB * handle, const Key * where)¶
Lookup a mountpoint in a handle for a specific key. Will return a key representing the mountpoint or null if there is no appropriate mountpoint e.g. its the root mountpoint.
Example:
Key * key = keyNew ("system/template");
KDB * handle = kdbOpen();
Key *mountpoint=0;
mountpoint=kdbGetMountpoint(handle, key);
printf("The backend I am using is %s mounted in %s0,
keyValue(mountpoint),
keyName(mountpoint));
kdbClose (handle);
keyDel (key);
Parameters:
where the key, that should be looked up.
Returns:
int mountModules (KDB * kdb, KeySet * modules, Key * errorKey)¶
Mount all module configurations.
Parameters:
modules the current list of loaded modules
errorKey the key used to report warnings
Return values:
0 otherwise
int mountOpen (KDB * kdb, KeySet * config, KeySet * modules, Key * errorKey)¶
Creates a trie from a given configuration. The config will be deleted within this function.
is not allowed to be executed before
Parameters:
modules the current list of loaded modules
config the configuration which should be used to build up the trie.
errorKey the key used to report warnings
Return values:
0 on success
int mountVersion (KDB * kdb, Key * errorKey)¶
Mount the version backend.
Parameters:
errorKey the key used to report warnings
Return values:
Author¶
Generated automatically by Doxygen for Elektra from the source code.
| Mon Jan 15 2018 | Version 0.8.20 |