Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/config.h
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | ||||||||||||
* Adds or replaces the value of the specified variable. | * Adds or replaces the value of the specified variable. | |||||||||||
* | * | |||||||||||
* If 'parent' is NULL, 'name' is assumed to be a top-level variable. | * If 'parent' is NULL, 'name' is assumed to be a top-level variable. | |||||||||||
*/ | */ | |||||||||||
void set_config_value_node(nvlist_t *parent, const char *name, | void set_config_value_node(nvlist_t *parent, const char *name, | |||||||||||
const char *value); | const char *value); | |||||||||||
/* | /* | |||||||||||
* Similar to set_config_value_node but only sets value if it's unset yet. | ||||||||||||
markjUnsubmitted Done Inline Actions
markj: | ||||||||||||
corvinkAuthorUnsubmitted Done Inline ActionsIt's already merged. See D33770. corvink: It's already merged. See D33770. | ||||||||||||
*/ | ||||||||||||
void set_config_value_node_if_unset(nvlist_t *const parent, | ||||||||||||
const char *const name, const char *const value); | ||||||||||||
/* | ||||||||||||
* Similar to set_config_value_node but expects a full path to the | * Similar to set_config_value_node but expects a full path to the | |||||||||||
* leaf node. | * leaf node. | |||||||||||
*/ | */ | |||||||||||
void set_config_value(const char *path, const char *value); | void set_config_value(const char *path, const char *value); | |||||||||||
/* | ||||||||||||
* Similar to set_config_value but only sets the value if it's unset yet. | ||||||||||||
markjUnsubmitted Done Inline Actions
markj: | ||||||||||||
corvinkAuthorUnsubmitted Done Inline ActionsIt's already merged. See D33770. corvink: It's already merged. See D33770. | ||||||||||||
*/ | ||||||||||||
void set_config_value_if_unset(const char *const path, const char *const value); | ||||||||||||
/* Convenience wrappers for boolean variables. */ | /* Convenience wrappers for boolean variables. */ | |||||||||||
bool get_config_bool(const char *path); | bool get_config_bool(const char *path); | |||||||||||
bool get_config_bool_node(const nvlist_t *parent, const char *name); | bool get_config_bool_node(const nvlist_t *parent, const char *name); | |||||||||||
bool get_config_bool_default(const char *path, bool def); | bool get_config_bool_default(const char *path, bool def); | |||||||||||
bool get_config_bool_node_default(const nvlist_t *parent, const char *name, | bool get_config_bool_node_default(const nvlist_t *parent, const char *name, | |||||||||||
bool def); | bool def); | |||||||||||
void set_config_bool(const char *path, bool value); | void set_config_bool(const char *path, bool value); | |||||||||||
void set_config_bool_node(nvlist_t *parent, const char *name, bool value); | void set_config_bool_node(nvlist_t *parent, const char *name, bool value); | |||||||||||
void dump_config(void); | void dump_config(void); | |||||||||||
#endif /* !__CONFIG_H__ */ | #endif /* !__CONFIG_H__ */ |