aboutsummaryrefslogtreecommitdiff
path: root/src/includes
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-15 09:24:50 +0000
committerRoy Marples <roy@marples.name>2008-01-15 09:24:50 +0000
commit3e0f49b846924a54df9115c038cf0a559a567db2 (patch)
tree63fb567cc51095400c596f3f323c42f4ee290598 /src/includes
parentb29c4aa9267592472cc591be88de6a854d24dd66 (diff)
rc_newer_than no longer tests if souce has data, making it a more logical function. As such, we add the existss function to check for existance and size when checking to see if the deptree needs an update.
Diffstat (limited to 'src/includes')
-rw-r--r--src/includes/rc-misc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/includes/rc-misc.h b/src/includes/rc-misc.h
index 68ebc803..ff32df92 100644
--- a/src/includes/rc-misc.h
+++ b/src/includes/rc-misc.h
@@ -111,6 +111,12 @@ static inline bool exists (const char *pathname)
return (stat (pathname, &buf) == 0);
}
+static inline bool existss (const char *pathname)
+{
+ struct stat buf;
+
+ return (stat (pathname, &buf) == 0 && buf.st_size != 0);
+}
char *rc_conf_value (const char *var);
bool rc_conf_yesno (const char *var);
char **env_filter (void);