diff options
author | Brian C. Lane <bcl@redhat.com> | 2021-06-10 15:45:57 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2021-06-11 13:47:36 -0700 |
commit | acb5300bfc37f8b8c217758e83a31b7ecca84f4a (patch) | |
tree | 13676690ba86dcab92e2e5df9b9296d4ccd9d759 | |
parent | 8e6976661409d7c87b1f0a80ebdddc450b4db2dd (diff) | |
download | parted-acb5300bfc37f8b8c217758e83a31b7ecca84f4a.tar.gz |
fs: Fix copy-paste error in HFS journal code
-rw-r--r-- | libparted/fs/r/hfs/journal.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libparted/fs/r/hfs/journal.c b/libparted/fs/r/hfs/journal.c index 862d3d3..c7cd009 100644 --- a/libparted/fs/r/hfs/journal.c +++ b/libparted/fs/r/hfs/journal.c @@ -337,12 +337,14 @@ hfsj_replay_journal(PedFileSystem* fs) } jh->checksum = HFS_CPU_TO_32(cksum, is_le); - /* The 2 following test are in the XNU Darwin source code */ - /* so I assume they're needed */ + /* https://github.com/apple-opensource/hfs/blob/master/core/hfs_journal.c#L1167 + * indicates that this is: + * wrap the start ptr if it points to the very end of the journal + */ if (jh->start == jh->size) jh->start = HFS_CPU_TO_64(PED_SECTOR_SIZE_DEFAULT, is_le); if (jh->end == jh->size) - jh->start = HFS_CPU_TO_64(PED_SECTOR_SIZE_DEFAULT, is_le); + jh->end = HFS_CPU_TO_64(PED_SECTOR_SIZE_DEFAULT, is_le); if (jh->start == jh->end) return 1; |