* grub-core/fs/ufs.c (grub_ufs_mtime) [MODE_UFS2]: Check mtime field

as well.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-03 15:00:45 +01:00
parent 7d0ac93163
commit 9d9b3d2f02
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2011-11-03 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ufs.c (grub_ufs_mtime) [MODE_UFS2]: Check mtime field
as well.
2011-11-03 Vladimir Serbinenko <phcoder@gmail.com> 2011-11-03 Vladimir Serbinenko <phcoder@gmail.com>
Make reiserfs label retrieval similar to other *_label functions. Make reiserfs label retrieval similar to other *_label functions.

View file

@ -761,11 +761,13 @@ grub_ufs_mtime (grub_device_t device, grub_int32_t *tm)
if (!data) if (!data)
*tm = 0; *tm = 0;
else else
{
*tm = grub_le_to_cpu32 (data->sblock.mtime);
#ifdef MODE_UFS2 #ifdef MODE_UFS2
*tm = grub_le_to_cpu64 (data->sblock.mtime2); if (*tm < (grub_int64_t) grub_le_to_cpu64 (data->sblock.mtime2))
#else *tm = grub_le_to_cpu64 (data->sblock.mtime2);
*tm = grub_le_to_cpu32 (data->sblock.mtime);
#endif #endif
}
grub_dl_unref (my_mod); grub_dl_unref (my_mod);