Skip to content

Commit

Permalink
fsck: debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Hyunchul Lee <[email protected]>
  • Loading branch information
hclee committed Jan 12, 2024
1 parent 58784c4 commit 3d959e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sudo mkdir /cores
sudo cp fsck/fsck.exfat /cores
cd tests
sudo ./test_fsck.sh
sudo ./test_fsck.sh bad_root
sudo coredumpctl list
sudo chmod -R a+rwx /cores
sudo coredumpctl dump | gzip -c > /cores/core.gz
Expand Down
6 changes: 4 additions & 2 deletions fsck/fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,16 @@ static uint16_t file_calc_checksum(struct exfat_de_iter *iter)
{
uint16_t checksum;
struct exfat_dentry *file_de, *de;
int i;
int i, ret;

checksum = 0;
exfat_de_iter_get(iter, 0, &file_de);

exfat_calc_dentry_checksum(file_de, &checksum, true);
for (i = 1; i <= file_de->file_num_ext; i++) {
exfat_de_iter_get(iter, i, &de);
ret = exfat_de_iter_get(iter, i, &de);
if (ret)
return 0;
exfat_calc_dentry_checksum(de, &checksum, false);
}
return checksum;
Expand Down

0 comments on commit 3d959e4

Please sign in to comment.