mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user