Lines Matching defs:config

65  * Last modification time to config file.
103 * If the configuration file does not exist, *listpp points to a config entry
226 * The caller is responsible for freeing any config entries added to
229 * Returns 0 on success and updates the '*listpp' config list,
257 * Use hardwired config.
353 * Creates the config structure with the values specified by the
356 * If 'complete' is set then this must represent a complete config entry
360 * Returns the newly created config structure on success.
375 nfsl_config_t *config;
377 if ((config = (nfsl_config_t *)malloc(sizeof (*config))) == NULL) {
381 (void) memset((void *)config, 0, sizeof (*config));
383 *error = update_config(config, tag, defaultdir, bufferpath, rpclogpath,
386 free(config);
390 config->nc_flags &= ~NC_UPDATED; /* This is a new entry */
392 return (config);
404 * On error, the config entry is left in an inconsistent state.
409 nfsl_config_t *config,
429 "update_config: \"%s\" not a complete config entry."),
433 "update_config: \"%s\" not a complete config entry.\n"),
440 if (config->nc_name == NULL) {
444 if ((config->nc_name = strdup(tag)) == NULL) {
449 assert(strcmp(config->nc_name, tag) == 0);
452 &config->nc_defaultdir, defaultdir, NULL, &updated))
462 &config->nc_bufferpath, bufferpath, defaultdir, &updated))
466 &config->nc_rpclogpath, rpclogpath, defaultdir, &updated))
470 &config->nc_fhpath, fhpath, defaultdir, &updated))
474 &config->nc_logpath, logpath, defaultdir, &updated))
477 updated = (config->nc_logformat != logformat);
479 config->nc_logformat = logformat;
483 config->nc_flags |= NC_UPDATED;
487 * Have the default global config point to this entry.
489 global = config;
506 "update_config: Can't process \"%s\" config entry: %s"),
510 "update_config: Can't process \"%s\" config entry: %s\n"),
526 char **old, /* pointer to config field */
567 * Removes and frees the 'config' entry from the list
575 nfsl_config_t *config,
582 if (p == config) {
605 free_config(nfsl_config_t *config)
607 if (config == NULL)
609 if (config->nc_name)
610 free(config->nc_name);
611 if (config->nc_defaultdir)
612 free(config->nc_defaultdir);
613 if (config->nc_bufferpath)
614 free(config->nc_bufferpath);
615 if (config->nc_rpclogpath)
616 free(config->nc_rpclogpath);
617 if (config->nc_fhpath)
618 free(config->nc_fhpath);
619 if (config->nc_logpath)
620 free(config->nc_logpath);
621 if (config == global)
623 if (config == global_raw)
625 free(config);
711 nfsl_config_t *config;
715 config = findconfig(&listp, tag, B_FALSE, (nfsl_config_t **)NULL);
716 if (config == NULL) {
730 config = findconfig(&listp, tag, B_FALSE,
735 return (config);
837 "Bad tag found in config file."));
840 "Bad tag found in config file.\n"));
872 nfsl_printconfig(nfsl_config_t *config)
874 if (config->nc_name)
875 (void) printf("tag=%s\t", config->nc_name);
876 if (config->nc_defaultdir)
877 (void) printf("defaultdir=%s\t", config->nc_defaultdir);
878 if (config->nc_logpath)
879 (void) printf("logpath=%s\t", config->nc_logpath);
880 if (config->nc_fhpath)
881 (void) printf("fhpath=%s\t", config->nc_fhpath);
882 if (config->nc_bufferpath)
883 (void) printf("bufpath=%s\t", config->nc_bufferpath);
884 if (config->nc_rpclogpath)
885 (void) printf("rpclogpath=%s\t", config->nc_rpclogpath);
886 if (config->nc_logformat == TRANSLOG_BASIC)
888 else if (config->nc_logformat == TRANSLOG_EXTENDED)
891 (void) printf("config->nc_logformat=UNKNOWN");
893 if (config->nc_flags & NC_UPDATED)