From 2b75a0d78e12ebdace42dd2812600b0adf7ae320 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 4 Feb 2017 23:11:43 +0000 Subject: [PATCH] getdata: remove POSIX_FADV_NOREUSE It is too difficult to know what users might want to do. Maybe some run this software all the time from a monitoring system, and in cases like that it is best to have caches helping. Signed-off-by: Sami Kerola --- src/getdata.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/getdata.c b/src/getdata.c index 906fa27..13b882a 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -71,10 +71,6 @@ int parse_leases(void) if (dhcpd_leases == NULL) error(EXIT_FAILURE, errno, "parse_leases: %s", config.dhcpdlease_file); #ifdef HAVE_POSIX_FADVISE -# ifdef POSIX_FADV_NOREUSE - if (posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_NOREUSE) != 0) - error(EXIT_FAILURE, errno, "parse_leases: fadvise %s", config.dhcpdlease_file); -# endif /* POSIX_FADV_NOREUSE */ # ifdef POSIX_FADV_SEQUENTIAL if (posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_SEQUENTIAL) != 0) error(EXIT_FAILURE, errno, "parse_leases: fadvise %s", config.dhcpdlease_file); @@ -200,10 +196,6 @@ void parse_config(int is_include, const char *restrict config_file, if (dhcpd_config == NULL) error(EXIT_FAILURE, errno, "parse_config: %s", config_file); #ifdef HAVE_POSIX_FADVISE -# ifdef POSIX_FADV_NOREUSE - if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_NOREUSE) != 0) - error(EXIT_FAILURE, errno, "parse_config: fadvise %s", config_file); -# endif /* POSIX_FADV_NOREUSE */ # ifdef POSIX_FADV_SEQUENTIAL if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL) != 0) error(EXIT_FAILURE, errno, "parse_config: fadvise %s", config_file);