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:
Dan Williams
2009-12-30 16:30:41 -06:00
parent 302e62d9c7
commit 8b4095cb23
6 changed files with 137 additions and 83 deletions

View File

@@ -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);