Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12661/ntfsprogs
Modified Files:
Makefile.in mkntfs.c ntfsinfo.c ntfsls.c ntfsmount.c ntfsrm.c
ntfsundelete.c utils.c utils.h
Log Message:
- Move ntfs2utc and utc2ntfs from utils.[ch] to timeconv.h.
- Add [acm]time fields to struct ntfs_inode and set them during ntfs_inode_open. Update ntfsmount to use them.
- Bump version, update autoscripts.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/Makefile.in,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- Makefile.in 20 Jul 2005 08:15:25 -0000 1.80
+++ Makefile.in 20 Jul 2005 19:06:49 -0000 1.81
@@ -246,6 +246,7 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/mkntfs.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- mkntfs.c 10 Jul 2005 21:42:44 -0000 1.61
+++ mkntfs.c 20 Jul 2005 19:06:49 -0000 1.62
@@ -126,6 +126,7 @@
#include "mst.h"
#include "runlist.h"
#include "utils.h"
+#include "timeconv.h"
#ifdef NO_NTFS_DEVICE_DEFAULT_IO_OPS
# error "No default device io operations! Cannot build mkntfs. \
Index: ntfsinfo.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -p -r1.70 -r1.71
--- ntfsinfo.c 18 Jul 2005 20:38:33 -0000 1.70
+++ ntfsinfo.c 20 Jul 2005 19:06:49 -0000 1.71
@@ -65,6 +65,7 @@
#include "security.h"
#include "mst.h"
#include "dir.h"
+#include "timeconv.h"
static const char *EXEC_NAME = "ntfsinfo";
Index: ntfsls.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsls.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- ntfsls.c 20 Jul 2005 16:04:40 -0000 1.24
+++ ntfsls.c 20 Jul 2005 19:06:50 -0000 1.25
@@ -40,6 +40,7 @@
#include "utils.h"
#include "dir.h"
#include "list.h"
+#include "timeconv.h"
static const char *EXEC_NAME = "ntfsls";
Index: ntfsmount.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- ntfsmount.c 19 Jul 2005 22:58:51 -0000 1.14
+++ ntfsmount.c 20 Jul 2005 19:06:50 -0000 1.15
@@ -283,12 +283,9 @@ static int ntfs_fuse_getattr(const char
stbuf->st_gid = ctx->gid;
stbuf->st_ino = ni->mft_no;
stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count);
- /*
- * TODO: Need support in libntfs for this.
- * stbuf->st_atime =
- * stbuf->st_ctime =
- * stbuf->st_mtime =
- */
+ stbuf->st_atime = ni->atime;
+ stbuf->st_ctime = ni->ctime;
+ stbuf->st_mtime = ni->mtime;
ntfs_inode_close(ni);
} else
res = -ENOENT;
Index: ntfsrm.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsrm.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -p -r1.47 -r1.48
--- ntfsrm.c 19 Jul 2005 23:13:26 -0000 1.47
+++ ntfsrm.c 20 Jul 2005 19:06:50 -0000 1.48
@@ -33,6 +33,7 @@
#include "dir.h"
#include "lcnalloc.h"
#include "mft.h"
+#include "timeconv.h"
static const char *EXEC_NAME = "ntfsrm";
static struct options opts;
Index: ntfsundelete.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsundelete.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -p -r1.42 -r1.43
--- ntfsundelete.c 19 Jul 2005 23:13:27 -0000 1.42
+++ ntfsundelete.c 20 Jul 2005 19:06:51 -0000 1.43
@@ -40,7 +40,6 @@
#include <time.h>
#include <limits.h>
#include <regex.h>
-#include <time.h>
#include <stdarg.h>
#include <utime.h>
@@ -53,6 +52,7 @@
#include "device.h"
#include "utils.h"
#include "debug.h"
+#include "timeconv.h"
static const char *EXEC_NAME = "ntfsundelete";
static const char *MFTFILE = "mft";
Index: utils.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/utils.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -p -r1.37 -r1.38
--- utils.c 19 Jul 2005 23:13:27 -0000 1.37
+++ utils.c 20 Jul 2005 19:06:51 -0000 1.38
@@ -56,8 +56,6 @@ const char *ntfs_gpl = "This program is
"\"COPYING\" distributed with this program, or online at:\n"
"http://www.gnu.org/copyleft/gpl.html\n";
-#define NTFS_TIME_OFFSET ((s64)(369 * 365 + 89) * 24 * 3600 * 10000000)
-
/**
* utils_set_locale
*/
@@ -295,41 +293,6 @@ int utils_parse_range (const char *strin
}
/**
- * ntfs2utc - Convert an NTFS time to Unix time
- * @ntfs_time: An NTFS time in 100ns units since 1601
- *
- * NTFS stores times as the number of 100ns intervals since January 1st 1601 at
- * 00:00 UTC. This system will not suffer from Y2K problems until ~57000AD.
- *
- * Return: n A Unix time (number of seconds since 1970)
- */
-time_t ntfs2utc (s64 ntfs_time)
-{
- return (ntfs_time - (NTFS_TIME_OFFSET)) / 10000000;
-}
-
-/**
- * utc2ntfs - Convert Linux time to NTFS time
- * @utc_time: Linux time to convert to NTFS
- *
- * Convert the Linux time @utc_time to its corresponding NTFS time.
- *
- * Linux stores time in a long at present and measures it as the number of
- * 1-second intervals since 1st January 1970, 00:00:00 UTC.
- *
- * NTFS uses Microsoft's standard time format which is stored in a s64 and is
- * measured as the number of 100 nano-second intervals since 1st January 1601,
- * 00:00:00 UTC.
- *
- * Return: n An NTFS time (100ns units since Jan 1601)
- */
-s64 utc2ntfs (time_t utc_time)
-{
- /* Convert to 100ns intervals and then add the NTFS time offset. */
- return (s64)utc_time * 10000000 + NTFS_TIME_OFFSET;
-}
-
-/**
* find_attribute - Find an attribute of the given type
* @type: An attribute type, e.g. AT_FILE_NAME
* @ctx: A search context, created using ntfs_get_attr_search_ctx
Index: utils.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/utils.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- utils.h 12 Jun 2005 18:12:57 -0000 1.23
+++ utils.h 20 Jul 2005 19:06:51 -0000 1.24
@@ -94,9 +94,6 @@ int utils_mftrec_in_use (ntfs_volume *vo
int utils_is_metadata (ntfs_inode *inode);
void utils_dump_mem (u8 *buf, int start, int length, int ascii);
-time_t ntfs2utc (s64 ntfs_time);
-s64 utc2ntfs (time_t utc_time);
-
ATTR_RECORD * find_attribute (const ATTR_TYPES type, ntfs_attr_search_ctx *ctx);
ATTR_RECORD * find_first_attribute (const ATTR_TYPES type, MFT_RECORD *mft);
|