diff options
author | pjd <pjd@FreeBSD.org> | 2010-08-05 19:08:54 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-08-05 19:08:54 +0000 |
commit | 7bbad9d8f8c1a9cc65ce892efef4ccdb734f3576 (patch) | |
tree | 5ad90e1683761e52442eef4afb76287b7b0d11eb /sbin/hastd/hast.h | |
parent | 31021ec9f13b3e3a013f75bfa436a2c7c4622ef3 (diff) | |
download | FreeBSD-src-7bbad9d8f8c1a9cc65ce892efef4ccdb734f3576.zip FreeBSD-src-7bbad9d8f8c1a9cc65ce892efef4ccdb734f3576.tar.gz |
Prepare configuration parsing code to be called multiple times:
- Don't exit on errors if not requested.
- Don't keep configuration in global variable, but allocate memory for
configuration.
- Call yyrestart() before yyparse() so that on error in configuration file
we will start from the begining next time and not from the place we left of.
MFC after: 1 month
Diffstat (limited to 'sbin/hastd/hast.h')
-rw-r--r-- | sbin/hastd/hast.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/hast.h b/sbin/hastd/hast.h index 2230afb..fda62c0 100644 --- a/sbin/hastd/hast.h +++ b/sbin/hastd/hast.h @@ -183,7 +183,7 @@ struct hast_resource { TAILQ_ENTRY(hast_resource) hr_next; }; -struct hastd_config *yy_config_parse(const char *config); +struct hastd_config *yy_config_parse(const char *config, bool exitonerror); void yy_config_free(struct hastd_config *config); void yyerror(const char *); |