aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/fat.h
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-11-06 15:53:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-06 18:41:20 -0500
commit7decd1cb0305b97243f283fa7f4baf5fe613edeb (patch)
treed17b291fd622c8ea45fd0ac8346f3c82c13759b6 /fs/fat/fat.h
parent9e975dae2970d22557662761c8505ce9fd165684 (diff)
fat: Fix and cleanup timestamp conversion
This cleans date_dos2unix()/fat_date_unix2dos() up. New code should be much more readable. And this fixes those old functions. Those doesn't handle 2100 correctly. 2100 isn't leap year, but old one handles it as leap year. Also, with this, centi sec is handled and is fixed. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r--fs/fat/fat.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 51f1c42ca5e3..a2a570f81719 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -263,9 +263,10 @@ extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
263extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); 263extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
264extern void fat_clusters_flush(struct super_block *sb); 264extern void fat_clusters_flush(struct super_block *sb);
265extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); 265extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
266extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc); 266extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts,
267extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date, 267 __le16 __time, __le16 __date, u8 time_cs);
268 int tz_utc); 268extern void fat_time_unix2fat(struct msdos_sb_info *sbi, struct timespec *ts,
269 __le16 *time, __le16 *date, u8 *time_cs);
269extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); 270extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);
270 271
271int fat_cache_init(void); 272int fat_cache_init(void);