mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
HFS filesystem mtime support
This commit is contained in:
1 parent
88db5b694a
commit
ebec6850b9
2 files changed
+21
-1
No files matched your search
@@ -1072,6 +1072,23 @@ grub_hfs_label (grub_device_t device, char **label)
|
|||||||
return grub_errno;
|
return grub_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static grub_err_t
|
||||||
|
grub_hfs_mtime (grub_device_t device, grub_int32_t *tm)
|
||||||
|
{
|
||||||
|
struct grub_hfs_data *data;
|
||||||
|
|
||||||
|
data = grub_hfs_mount (device->disk);
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
*tm = grub_be_to_cpu32 (data->sblock.mtime) - 2082844800;
|
||||||
|
else
|
||||||
|
*tm = 0;
|
||||||
|
|
||||||
|
grub_free (data);
|
||||||
|
return grub_errno;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
grub_hfs_uuid (grub_device_t device, char **uuid)
|
grub_hfs_uuid (grub_device_t device, char **uuid)
|
||||||
{
|
{
|
||||||
@@ -1107,6 +1124,7 @@ static struct grub_fs grub_hfs_fs =
|
|||||||
.close = grub_hfs_close,
|
.close = grub_hfs_close,
|
||||||
.label = grub_hfs_label,
|
.label = grub_hfs_label,
|
||||||
.uuid = grub_hfs_uuid,
|
.uuid = grub_hfs_uuid,
|
||||||
|
.mtime = grub_hfs_mtime,
|
||||||
.next = 0
|
.next = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -39,7 +39,9 @@ typedef struct grub_hfs_extent grub_hfs_datarecord_t[3];
|
|||||||
struct grub_hfs_sblock
|
struct grub_hfs_sblock
|
||||||
{
|
{
|
||||||
grub_uint16_t magic;
|
grub_uint16_t magic;
|
||||||
grub_uint8_t unused[18];
|
grub_uint32_t ctime;
|
||||||
|
grub_uint32_t mtime;
|
||||||
|
grub_uint8_t unused[10];
|
||||||
grub_uint32_t blksz;
|
grub_uint32_t blksz;
|
||||||
grub_uint8_t unused2[4];
|
grub_uint8_t unused2[4];
|
||||||
grub_uint16_t first_block;
|
grub_uint16_t first_block;
|
||||||
|
|||||||
Reference in new issue
Block a user