Lines Matching refs:name
144 static int get_value(config_fn_t fn, void *data, char *name, unsigned int len)
149 /* Get the full name */
156 name[len++] = c;
160 name[len] = 0;
172 return fn(name, value, data);
175 static int get_extended_base_var(char *name, int baselen, int c)
186 name[baselen++] = '.';
200 name[baselen++] = ch;
211 static int get_base_var(char *name)
222 return get_extended_base_var(name, baselen, c);
227 name[baselen++] = tolower(c);
345 static void bad_config(const char *name)
348 pr_warning("bad config value for '%s' in %s, ignoring...\n", name, config_file_name);
350 pr_warning("bad config value for '%s', ignoring...\n", name);
353 int perf_config_u64(u64 *dest, const char *name, const char *value)
358 bad_config(name);
366 int perf_config_int(int *dest, const char *name, const char *value)
370 bad_config(name);
377 int perf_config_u8(u8 *dest, const char *name, const char *value)
382 bad_config(name);
389 static int perf_config_bool_or_int(const char *name, const char *value, int *is_bool)
403 return perf_config_int(&ret, name, value) < 0 ? -1 : ret;
406 int perf_config_bool(const char *name, const char *value)
409 return !!perf_config_bool_or_int(name, value, &discard);
412 static const char *perf_config_dirname(const char *name, const char *value)
414 if (!name)
540 if (!strcmp(section->name, section_name))
546 static struct perf_config_item *find_config_item(const char *name,
552 if (!strcmp(item->name, name))
567 section->name = strdup(section_name);
568 if (!section->name) {
579 const char *name)
586 item->name = strdup(name);
587 if (!item->name) {
614 char *section_name, *name;
631 name = ptr;
632 if (name == NULL || value == NULL)
642 item = find_config_item(name, section);
644 item = add_config_item(section, name);
764 section->name, item->name);
795 zfree(&item->name);
813 zfree(§ion->name);