about summary refs log tree commit diff
path: root/resolv/resolv_conf.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-01-21 17:25:39 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-02-14 08:14:03 +0100
commitdd0b4df329ff7ff2a656404db271c8ee8379ff9d (patch)
tree6f23c84805f0f5eff4ebd08aa8e5090bc78d9fdd /resolv/resolv_conf.h
parenta1a20f029299dc27170912bb9233070c8403444d (diff)
downloadglibc-dd0b4df329ff7ff2a656404db271c8ee8379ff9d.tar.gz
glibc-dd0b4df329ff7ff2a656404db271c8ee8379ff9d.tar.xz
glibc-dd0b4df329ff7ff2a656404db271c8ee8379ff9d.zip
resolv: Enhance __resolv_conf_load to capture file change data
The data is captured after reading the file.  This allows callers
to check the change data against an earlier measurement.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'resolv/resolv_conf.h')
-rw-r--r--resolv/resolv_conf.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/resolv/resolv_conf.h b/resolv/resolv_conf.h
index 01cbff9111..101e14bfe5 100644
--- a/resolv/resolv_conf.h
+++ b/resolv/resolv_conf.h
@@ -63,12 +63,16 @@ struct resolv_conf
    and the struct resolv_context facility.  */
 
 struct __res_state;
+struct file_change_detection;
 
 /* Read /etc/resolv.conf and return a configuration object, or NULL if
    /etc/resolv.conf cannot be read due to memory allocation errors.
-   If PREINIT is not NULL, some configuration values are taken from the
-   struct __res_state object.  */
-struct resolv_conf *__resolv_conf_load (struct __res_state *preinit)
+   If PREINIT is not NULL, some configuration values are taken from
+   the struct __res_state object.  If CHANGE is not null, file change
+   detection data is written to *CHANGE, based on the state of the
+   file after reading it.  */
+struct resolv_conf *__resolv_conf_load (struct __res_state *preinit,
+                                        struct file_change_detection *change)
   attribute_hidden __attribute__ ((warn_unused_result));
 
 /* Return a configuration object for the current /etc/resolv.conf