Home | History | Annotate | Download | only in wifi

Lines Matching full:config_file

321 int update_ctrl_interface(const char *config_file) {
331 if (stat(config_file, &sb) != 0)
337 srcfd = TEMP_FAILURE_RETRY(open(config_file, O_RDONLY));
339 ALOGE("Cannot open \"%s\": %s", config_file, strerror(errno));
346 ALOGE("Cannot read \"%s\": %s", config_file, strerror(errno));
351 if (!strcmp(config_file, SUPP_CONFIG_FILE)) {
384 destfd = TEMP_FAILURE_RETRY(open(config_file, O_RDWR, 0660));
386 ALOGE("Cannot update \"%s\": %s", config_file, strerror(errno));
399 int ensure_config_file_exists(const char *config_file)
407 ret = access(config_file, R_OK|W_OK);
410 (chmod(config_file, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) != 0)) {
411 ALOGE("Cannot set RW to \"%s\": %s", config_file, strerror(errno));
415 if (update_ctrl_interface(config_file) >=0) {
423 ALOGE("Cannot access \"%s\": %s", config_file, strerror(errno));
433 destfd = TEMP_FAILURE_RETRY(open(config_file, O_CREAT|O_RDWR, 0660));
436 ALOGE("Cannot create \"%s\": %s", config_file, strerror(errno));
445 unlink(config_file);
455 if (chmod(config_file, 0660) < 0) {
457 config_file, strerror(errno));
458 unlink(config_file);
462 if (chown(config_file, AID_SYSTEM, AID_WIFI) < 0) {
464 config_file, AID_WIFI, strerror(errno));
465 unlink(config_file);
468 return update_ctrl_interface(config_file);