Lines Matching refs:file
583 // Store resolver settings in resolv.conf file, while maintaining any
591 FILE* file = fopen(path.Path(), "r+");
593 if (file == NULL) {
595 file = fopen(path.Path(), "w");
596 if (file == NULL) {
610 while (fgets(resolveConfBuffer, sizeResolveConfBuffer, file)) {
613 fclose(file);
622 if (feof(file) != 0) {
623 // No static entries found, close and re-open as new file
624 fclose(file);
625 file = fopen(path.Path(), "w");
626 if (file == NULL) {
634 fprintf(file, "# Added automatically by DHCP\n");
639 fprintf(file, "nameserver %s\n", nameserver);
644 fprintf(file, "domain %s\n", domain);
646 fprintf(file, "# End of automatic DHCP additions\n");
648 fclose(file);