From 3d37005a3d0c9a90578fcb249b823f08a6c58f49 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 12 Jan 2009 23:53:13 +0000 Subject: We now warn about clock skews rc-update -u will force a regen of the dep tree rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime --- src/librc/rc.h.in | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/librc/rc.h.in') diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 6f7c64e..1012274 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008 Roy Marples + * Copyright 2007-2009 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without @@ -304,25 +304,31 @@ typedef void *RC_DEPTREE; /*! Check to see if source is newer than target. * If target is a directory then we traverse it and it's children. + * time_t returns the time of the newest file found if newer. * @return true if source is newer than target, otherwise false */ -bool rc_newer_than(const char *, const char *); +bool rc_newer_than(const char *, const char *, char *, time_t *); -/*! Check to see if source is newer than target. +/*! Check to see if source is older than target. * If target is a directory then we traverse it and it's children. -* @return true if source is newer than target, otherwise false */ -bool rc_older_than(const char *, const char *); + * time_t returns the time of the oldest file found if older. +* @return true if source is older than target, otherwise false */ +bool rc_older_than(const char *, const char *, char *, time_t *); /*! Update the cached dependency tree if it's older than any init script, * its configuration file or an external configuration file the init script * has specified. + * time_t returns the time of the newest file that the dependency tree + * will be checked against. * @return true if successful, otherwise false */ bool rc_deptree_update(void); /*! Check if the cached dependency tree is older than any init script, * its configuration file or an external configuration file the init script * has specified. + * @param buffer of PATH_MAX to store newest file + * @param mtime of newest file * @return true if it needs updating, otherwise false */ -bool rc_deptree_update_needed(void); +bool rc_deptree_update_needed(char *, time_t *); /*! Load the cached dependency tree and return a pointer to it. * This pointer should be freed with rc_deptree_free when done. -- cgit v1.2.3