summaryrefslogtreecommitdiffstats
path: root/include/linux/hfs_sysdep.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /include/linux/hfs_sysdep.h
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'include/linux/hfs_sysdep.h')
-rw-r--r--include/linux/hfs_sysdep.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/hfs_sysdep.h b/include/linux/hfs_sysdep.h
index 22e2ac66b..00cc64008 100644
--- a/include/linux/hfs_sysdep.h
+++ b/include/linux/hfs_sysdep.h
@@ -25,6 +25,7 @@
#include <asm/byteorder.h>
#include <asm/unaligned.h>
+extern struct timezone sys_tz;
#undef offsetof
#define offsetof(TYPE, MEMB) ((size_t) &((TYPE *)0)->MEMB)
@@ -68,8 +69,24 @@ extern inline void hfs_free(void *ptr, unsigned int size) {
}
+/* handle conversion between times.
+ *
+ * NOTE: hfs+ doesn't need this. also, we don't use tz_dsttime as that's
+ * not a good thing to do. instead, we depend upon tz_minuteswest
+ * having the correct daylight savings correction.
+ */
+extern inline hfs_u32 hfs_from_utc(hfs_s32 time)
+{
+ return time - sys_tz.tz_minuteswest*60;
+}
+
+extern inline hfs_s32 hfs_to_utc(hfs_u32 time)
+{
+ return time + sys_tz.tz_minuteswest*60;
+}
+
extern inline hfs_u32 hfs_time(void) {
- return htonl(CURRENT_TIME+2082844800U);
+ return htonl(hfs_from_utc(CURRENT_TIME)+2082844800U);
}