Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
39dd2e2a
Commit
39dd2e2a
authored
5 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Document validate_fn_t as it stands.
Also document that it will be changed in a later branch.
parent
aeda598f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/config/confparse.h
+22
-4
22 additions, 4 deletions
src/app/config/confparse.h
with
22 additions
and
4 deletions
src/app/config/confparse.h
+
22
−
4
View file @
39dd2e2a
...
...
@@ -51,10 +51,28 @@ typedef struct config_deprecation_t {
**/
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
/** Type of a callback to validate whether a given configuration is
* well-formed and consistent. See options_trial_assign() for documentation
* of arguments. */
typedef
int
(
*
validate_fn_t
)(
void
*
,
void
*
,
void
*
,
int
,
char
**
);
/**
* Type of a callback to validate whether a given configuration is
* well-formed and consistent.
*
* The configuration to validate is passed as <b>newval</b>. The previous
* configuration, if any, is provided in <b>oldval</b>. The
* <b>default_val</b> argument receives a configuration object initialized
* with default values for all its fields. The <b>from_setconf</b> argument
* is true iff the input comes from a SETCONF controller command.
*
* On success, return 0. On failure, set *<b>msg_out</b> to a newly allocated
* error message, and return -1.
*
* REFACTORING NOTE: Currently, this callback type is only used from inside
* config_dump(); later in our refactoring, it will be cleaned up and used
* more generally.
*/
typedef
int
(
*
validate_fn_t
)(
void
*
oldval
,
void
*
newval
,
void
*
default_val
,
int
from_setconf
,
char
**
msg_out
);
struct
config_mgr_t
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment