aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/namei_msdos.c
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/namei_msdos.c
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/namei_msdos.c')
-rw-r--r--fs/fat/namei_msdos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index c0a4d5cd99b..e92e8158eba 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -247,7 +247,7 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
247 if (is_hid) 247 if (is_hid)
248 de.attr |= ATTR_HIDDEN; 248 de.attr |= ATTR_HIDDEN;
249 de.lcase = 0; 249 de.lcase = 0;
250 fat_date_unix2dos(ts->tv_sec, &time, &date, sbi->options.tz_utc); 250 fat_time_unix2fat(sbi, ts, &time, &date, NULL);
251 de.cdate = de.adate = 0; 251 de.cdate = de.adate = 0;
252 de.ctime = 0; 252 de.ctime = 0;
253 de.ctime_cs = 0; 253 de.ctime_cs = 0;