X-Git-Url: http://git.asbjorn.biz/?p=debian%2Fdhcpd-pools.git;a=blobdiff_plain;f=src%2Fgetdata.c;fp=src%2Fgetdata.c;h=1a7cba8f2955cee9a07e94c027e9c837d5a4d90a;hp=b1e79b959deb9d57025e51c699ce7e8cacdeac18;hb=10488b0a040d2702273a7922c8b6bcebfb3cd85f;hpb=f32e023ecf6af961f5b39f03285349336e59f214 diff --git a/src/getdata.c b/src/getdata.c index b1e79b9..1a7cba8 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -76,16 +76,16 @@ int parse_leases(void) err(EXIT_FAILURE, "parse_leases: %s", config.dhcpdlease_file); } -#ifdef POSIX_FADV_NOREUSE - posix_fadvise((long) dhcpd_leases, 0, 0, POSIX_FADV_NOREUSE); +#ifdef POSIX_FADV_WILLNEED + posix_fadvise((long) dhcpd_leases, 0, 0, POSIX_FADV_WILLNEED); if (errno) { - err(EXIT_FAILURE, "parse_leases: fadvise noreuse"); + err(EXIT_FAILURE, "parse_leases: fadvise %s", config.dhcpdlease_file); } -#endif /* POSIX_FADV_NOREUSE */ +#endif /* POSIX_FADV_WILLNEED */ #ifdef POSIX_FADV_SEQUENTIAL posix_fadvise((long) dhcpd_leases, 0, 0, POSIX_FADV_SEQUENTIAL); if (errno) { - err(EXIT_FAILURE, "parse_leases: fadvise sequential"); + err(EXIT_FAILURE, "parse_leases: fadvise %s", config.dhcpdlease_file); } #endif /* POSIX_FADV_SEQUENTIAL */ @@ -228,16 +228,16 @@ char *parse_config(int is_include, char *config_file, if (dhcpd_config == NULL) { err(EXIT_FAILURE, "parse_config: %s", config_file); } -#ifdef POSIX_FADV_NOREUSE - posix_fadvise((long) dhcpd_config, 0, 0, POSIX_FADV_NOREUSE); +#ifdef POSIX_FADV_WILLNEED + posix_fadvise((long) dhcpd_config, 0, 0, POSIX_FADV_WILLNEED); if (errno) { - err(EXIT_FAILURE, "parse_config: fadvise noreuse"); + err(EXIT_FAILURE, "parse_config: fadvise %s", config_file); } -#endif /* POSIX_FADV_NOREUSE */ +#endif /* POSIX_FADV_WILLNEED */ #ifdef POSIX_FADV_SEQUENTIAL posix_fadvise((long) dhcpd_config, 0, 0, POSIX_FADV_SEQUENTIAL); if (errno) { - err(EXIT_FAILURE, "parse_config: fadvise sequential"); + err(EXIT_FAILURE, "parse_config: fadvise %s", config_file); } #endif /* POSIX_FADV_SEQUENTIAL */