Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bootparamd/bootparamd/bootparamd.c
Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | |||||
/* getthefile return 1 and fills the buf with the information | /* getthefile return 1 and fills the buf with the information | ||||
of the file, e g "host:/export/root/client" if it can be found. | of the file, e g "host:/export/root/client" if it can be found. | ||||
If the host is in the database, but the file is not, the buf | If the host is in the database, but the file is not, the buf | ||||
will be empty. (This makes it possible to give the special | will be empty. (This makes it possible to give the special | ||||
empty answer for the file "dump") */ | empty answer for the file "dump") */ | ||||
static int | static int | ||||
getthefile(char *l_askname, char *fileid, char *buf, int blen) | getthefile(char *l_askname, char *fileid, char *buf, int blen __unused) | ||||
{ | { | ||||
FILE *bpf; | FILE *bpf; | ||||
char *where; | char *where; | ||||
#ifdef YP | #ifdef YP | ||||
static char *result; | static char *result; | ||||
int resultlen; | int resultlen; | ||||
static char *yp_domain; | static char *yp_domain; | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | #define REXPAND(d) AS_FORMAT(d) /* Force another preprocessor expansion */ | ||||
return(match); | return(match); | ||||
} | } | ||||
/* checkhost puts the hostname found in the database file in | /* checkhost puts the hostname found in the database file in | ||||
the l_hostname-variable and returns 1, if l_askname is a valid | the l_hostname-variable and returns 1, if l_askname is a valid | ||||
name for a host in the database */ | name for a host in the database */ | ||||
static int | static int | ||||
checkhost(char *l_askname, char *l_hostname, int len) | checkhost(char *l_askname, char *l_hostname, int len __unused) | ||||
{ | { | ||||
int ch, pch; | int ch, pch; | ||||
FILE *bpf; | FILE *bpf; | ||||
int res = 0; | int res = 0; | ||||
#ifdef YP | #ifdef YP | ||||
static char *result; | static char *result; | ||||
int resultlen; | int resultlen; | ||||
static char *yp_domain; | static char *yp_domain; | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |