Logs static hosts
parent
4c443474e5
commit
8c377d6234
|
|
@ -129,13 +129,14 @@ int preserve_static_entries(){
|
||||||
char c = EOF;
|
char c = EOF;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
printf("Static hosts are:\n");
|
||||||
do{
|
do{
|
||||||
c = fgetc(hostsf);
|
c = fgetc(hostsf);
|
||||||
printf("%c",c);
|
|
||||||
strncat(buff, &c, 1);
|
strncat(buff, &c, 1);
|
||||||
if (strncmp(buff, "# rhosts begin", 14) == 0){c = EOF;}
|
if (strncmp(buff, "# rhosts begin", 14) == 0){c = EOF;}
|
||||||
if (c == '\n'){
|
if (c == '\n'){
|
||||||
rc = fputs(buff, tmpf);
|
rc = fputs(buff, tmpf);
|
||||||
|
printf("%s",buff);
|
||||||
buff[0] = '\0';
|
buff[0] = '\0';
|
||||||
}
|
}
|
||||||
}while ( c != EOF);
|
}while ( c != EOF);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue