Lines Matching refs:fields
69 ALOGI("\tfield_name = %s", instance->fields[i].field_name); in log_config_instance()
70 ALOGI("\tdata_type = %u", instance->fields[i].data_type); in log_config_instance()
71 ALOGI("\tnum_data = %u", instance->fields[i].num_data); in log_config_instance()
72 switch (instance->fields[i].data_type){ in log_config_instance()
73 case FIELD_INT: ALOGI("\tdata = %d", *(int*)(instance->fields[i].data)); in log_config_instance()
75 case FIELD_STR: ALOGI("\tdata = %s", (char*)(instance->fields[i].data)); in log_config_instance()
77 default: ALOGI("\tdata = 0x%p", instance->fields[i].data); in log_config_instance()
166 if (config->fields) { in free_config_instance()
167 free(config->fields[0].data); in free_config_instance()
168 free(config->fields[0].field_name); in free_config_instance()
169 free(config->fields); in free_config_instance()
205 config->fields = (struct field_data *)malloc(sizeof(struct field_data)); in allocate_config_instance()
206 if (!config->fields) { in allocate_config_instance()
211 memset(config->fields, 0, sizeof(*config->fields)); in allocate_config_instance()
213 config->fields[0].field_name = (char*)malloc(sizeof(char) * max_string_size); in allocate_config_instance()
214 if (!config->fields[0].field_name) { in allocate_config_instance()
219 memset(config->fields[0].field_name, 0, sizeof(char) * max_string_size); in allocate_config_instance()
221 config->fields[0].data = (void*)malloc(sizeof(int)); in allocate_config_instance()
222 if (!config->fields[0].data) { in allocate_config_instance()
247 strlcpy(config->fields[0].field_name, "disable", max_string_size); in disable_config()
251 config->fields[0].data_type = FIELD_INT; in disable_config()
252 config->fields[0].num_data = 1; in disable_config()
253 *(int*)(config->fields[0].data) = 1; //DISABLE in disable_config()
281 strlcpy(config->fields[0].field_name, "disable", max_string_size); in enable_config()
285 config->fields[0].data_type = FIELD_INT; in enable_config()
286 config->fields[0].num_data = 1; in enable_config()
287 *(int*)(config->fields[0].data) = 0; //ENABLE in enable_config()