Data Structures | |
struct | ParsingContext |
Parsing Context. More... | |
Defines | |
#define | MAX_DEPTH 32 |
Maximum nesting depth. | |
#define | CDATA_BUF_SIZE 1024 |
Maximum amount of CDATA. | |
#define | MAX_KEY_SIZE 128 |
Max length of property key. | |
Enumerations | |
enum | { CURELEM_UNKNOWN = -1, CURELEM_MNTD = 0, CURELEM_MOUNTPATH = 1, CURELEM_USER = 2, CURELEM_GROUP = 3, CURELEM_WDIR = 4, CURELEM_PIDFILE = 5, CURELEM_FILESYSTEMS = 6, CURELEM_FILESYSTEM = 7, CURELEM_DBUS_RECONNECT = 8, CURELEM_LOGLEVEL = 9, CURELEM_UMOUNT_ON_EXIT = 10, CURELEM_MOUNTPREFIX = 11 } |
Possible elements the parser can process. More... | |
Functions | |
void | mntd_volume_config_parsing_abort (ParsingContext *pc) |
Abort parsing of document. | |
void | mntd_volume_config_start (ParsingContext *pc, const char *el, const char **attr) |
Called by expat when an element begins. | |
void | mntd_volume_config_end (ParsingContext *pc, const char *el) |
Called by expat when an element ends. | |
void | mntd_volume_config_cdata (ParsingContext *pc, const char *s, int len) |
Called when there is CDATA. | |
ConfigData * | mntd_volume_config_parse (char *config, char *pidfile) |
Parse the config file. | |
int | mntd_volume_config_free (ConfigData **cfg) |
Free config file data. | |
void | compare_filesystems (gpointer key, gpointer value, gpointer user_data) |
Specifies the type of the function passed to g_hash_table_foreach(). | |
int | mntd_volume_config_reload (ConfigData **cfg, char *pidfile) |
Reload config file data. |
|
Possible elements the parser can process.
Definition at line 59 of file mntd_volume_config.c. |
|
Specifies the type of the function passed to g_hash_table_foreach(). It is called with each key/value pair, together with the user_data parameter which is passed to g_hash_table_foreach().
Definition at line 778 of file mntd_volume_config.c. References MSG_NOTICE. Referenced by mntd_volume_config_reload(). |
|
Called when there is CDATA.
Definition at line 486 of file mntd_volume_config.c. References ParsingContext::aborted, ParsingContext::cdata_buf, ParsingContext::cdata_buf_len, CDATA_BUF_SIZE, and MSG_ERR. Referenced by mntd_volume_config_parse(). |
|
Called by expat when an element ends.
Definition at line 375 of file mntd_volume_config.c. References ParsingContext::aborted, ParsingContext::c, ParsingContext::cdata_buf, ParsingContext::cdata_buf_len, ParsingContext::curelem, ParsingContext::curelem_stack, ConfigData::dbus_reconnect, ParsingContext::depth, ConfigData::group, ConfigData::loglevel, ConfigData::mountpath, ConfigData::mountprefix, MSG_DEBUG, MSG_WARNING, ConfigData::umount_on_exit, ConfigData::user, and ConfigData::wdir. Referenced by mntd_volume_config_parse(). |
|
Free config file data.
Definition at line 721 of file mntd_volume_config.c. References ConfigData::absfilepath, ConfigData::filesystems, ConfigData::group, ConfigData::mountpath, ConfigData::pidfile, ConfigData::user, and ConfigData::wdir. Referenced by main(). |
|
Parse the config file.
Definition at line 546 of file mntd_volume_config.c. References ParsingContext::aborted, ConfigData::absfilepath, ParsingContext::c, ParsingContext::cdata_buf, ParsingContext::cdata_buf_len, ParsingContext::config, ParsingContext::curelem, ConfigData::dbus_reconnect, ParsingContext::depth, ConfigData::filesystems, ConfigData::group, ConfigData::loglevel, mntd_volume_config_cdata(), mntd_volume_config_end(), mntd_volume_config_start(), ConfigData::mountpath, ConfigData::mountprefix, MSG_EMERG, MSG_ERR, MSG_INF, ParsingContext::parser, ConfigData::pidfile, sb_file_get_size(), sb_file_is_file(), sb_file_read(), ConfigData::sleep_millis, ConfigData::umount_on_exit, ConfigData::user, and ConfigData::wdir. Referenced by main(), and mntd_volume_config_reload(). |
|
Abort parsing of document.
Definition at line 151 of file mntd_volume_config.c. References ParsingContext::aborted, and MSG_ERR. Referenced by mntd_volume_config_start(). |
|
Reload config file data.
Definition at line 800 of file mntd_volume_config.c. References ConfigData::absfilepath, compare_filesystems(), ConfigData::dbus_reconnect, EM_TYPE_SYSLOG, emInit(), ConfigData::filesystems, ConfigData::group, ConfigData::loglevel, mntd_volume_config_parse(), ConfigData::mountpath, MSG_ERR, MSG_NOTICE, MSG_WARNING, ConfigData::pidfile, ConfigData::sleep_millis, ConfigData::umount_on_exit, ConfigData::user, and ConfigData::wdir. Referenced by main(). |
|
Called by expat when an element begins.
Definition at line 169 of file mntd_volume_config.c. References ParsingContext::aborted, ParsingContext::c, ParsingContext::cdata_buf_len, ParsingContext::config, ParsingContext::curelem, ParsingContext::curelem_stack, ParsingContext::depth, ConfigData::filesystems, MAX_DEPTH, mntd_volume_config_parsing_abort(), MSG_DEBUG, MSG_ERR, MSG_INF, MSG_WARNING, ParsingContext::parser, and ConfigData::sleep_millis. Referenced by mntd_volume_config_parse(). |