summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-08-12 19:04:18 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-08-12 19:04:18 +0200
commitd7a1c2e18229160870dc98f5fcee63c9d0c72eff (patch)
treec96b861af76a50d7f58a6b006c1d6a9ef0a6cd0a /src/dir.c
parent79594ca992831ad19a3648af48d86d61dc14596e (diff)
Move set_date() to a separate file
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/dir.c b/src/dir.c
index ee5c04b..cf84c31 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -37,9 +37,6 @@
#include <sys/stat.h>
#endif
#include "types.h"
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif
#include <errno.h>
#ifdef HAVE_IO_H
#include <io.h>
@@ -331,35 +328,6 @@ int dir_whole_partition_log(disk_t *disk, const partition_t *partition, dir_data
return dir_whole_partition_log_aux(disk, partition, dir_data, inode);
}
-/**
- * set_date - Set the file's date and time
- * @pathname: Path and name of the file to alter
- * @actime: Date and time to set
- * @modtime: Date and time to set
- *
- * Give a file a particular date and time.
- *
- * Return: 1 Success, set the file's date and time
- * 0 Error, failed to change the file's date and time
- */
-int set_date(const char *pathname, time_t actime, time_t modtime)
-{
-#ifdef HAVE_UTIME
- struct utimbuf ut;
- if (!pathname)
- return 0;
- ut.actime = actime;
- ut.modtime = modtime;
- if (utime(pathname, &ut)) {
- log_error("ERROR: Couldn't set the file's date and time for %s\n", pathname);
- return 0;
- }
- return 1;
-#else
- return 0;
-#endif
-}
-
int filesort(const struct td_list_head *a, const struct td_list_head *b)
{
const file_info_t *file_a=td_list_entry(a, file_info_t, list);