Changeset 19689 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- May 14, 2009 11:47:12 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r19525 r19689 431 431 char buff[512]; 432 432 char buff2[256]; 433 FILE *f ;433 FILE *f = NULL; 434 434 int found = 0; 435 435 struct in_addr tmp_addr; … … 438 438 /* Try various locations. */ 439 439 char *etc = getenv("ETC"); 440 f = NULL;441 440 if (etc) 442 441 { … … 455 454 } 456 455 #else 456 #ifndef DEBUG_vvl 457 457 f = fopen("/etc/resolv.conf", "r"); 458 #else 459 char *home = getenv("HOME"); 460 snprintf(buff, sizeof(buff), "%s/resolv.conf", home); 461 f = fopen(buff, "r"); 462 if (f != NULL) 463 { 464 Log(("NAT: DNS we're using %s\n", buff)); 465 } 466 else 467 { 468 f = fopen("/etc/resolv.conf", "r"); 469 Log(("NAT: DNS we're using %s\n", buff)); 470 } 471 #endif 458 472 #endif 459 473 if (!f)
Note:
See TracChangeset
for help on using the changeset viewer.