- storage = create_powerpc_nvram_storage(config);
-
- storage->load(storage, config);
-
- dump_config(config);
-
- return 0;
-}
-
-int config_set(struct config *newconfig)
-{
- int rc;
-
- if (!storage || !storage->save)
- return -1;
-
- if (newconfig == config)
- return 0;
-
- pb_log("new configuration data received\n");
- dump_config(newconfig);
-
- rc = storage->save(storage, newconfig);
-
- if (!rc)
- config = talloc_steal(config_ctx, newconfig);
- else
- pb_log("error saving new configuration; changes lost\n");
-
- return rc;
-}
-
-/* A non-exported function to allow the test infrastructure to initialise
- * (and change) the configuration variables */
-struct parser_test;
-struct config __attribute__((unused)) *test_config_init(
- struct parser_test *test);
-struct config *test_config_init(struct parser_test *test)
-{
- config = talloc(test, struct config);
- config_set_defaults(config);
- return config;
-}
-
-const struct config *config_get(void)
-{
- return config;
-}
-
-void config_set_autoboot(bool autoboot_enabled)
-{
- config->autoboot_enabled = autoboot_enabled;
-
- pb_log("set autoboot: %s\n",
- config->autoboot_enabled ? "enabled" : "disabled");
-}
-
-int config_fini(void)
-{
- talloc_free(config_ctx);
- return 0;