ifcfg-rh: ensure keys/route files are monitored for changes too
keys- and route- files weren't passing the should_ignore_file() check in dir_changed() because should_ignore_file() was only taking ifcfg- files into account. Generalize most of the ifcfg name handling functions so that should_ignore_file() will now handle all three variants. Add testcases to ensure that the name handling does what we want it to, and optimize memory usage of utils_get_ifcfg_name() a bit.
This commit is contained in:
@@ -31,9 +31,11 @@ char *utils_hexstr2bin (const char *hex, size_t len);
|
||||
|
||||
char *utils_cert_path (const char *parent, const char *suffix);
|
||||
|
||||
char *utils_get_ifcfg_name (const char *file);
|
||||
const char *utils_get_ifcfg_name (const char *file, gboolean only_ifcfg);
|
||||
|
||||
char *utils_get_extra_path (const char *parent, const char *tag);
|
||||
gboolean utils_should_ignore_file (const char *filename, gboolean only_ifcfg);
|
||||
|
||||
char *utils_get_ifcfg_path (const char *parent);
|
||||
char *utils_get_keys_path (const char *parent);
|
||||
char *utils_get_route_path (const char *parent);
|
||||
|
||||
|
Reference in New Issue
Block a user