Skip to content

Commit

Permalink
Add another "magic" mark to figure out FAT data.
Browse files Browse the repository at this point in the history
Yeah, I know it's lie, but this code has been created before
understanding FAT format so it's needs to be updated with
FAT knowledge.
  • Loading branch information
marmolak committed Feb 15, 2022
1 parent 34fcc29 commit c8a6925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define FAT_MAGIC_1 0xEB3C9000u
#define FAT_MAGIC_2 0xEB3E9000u
#define FAT_MAGIC_3 0xEB3F9000u
#define FAT_MAGIC_4 0xEB1E9000u
#define GOTEK_MAX_FDDS 1000u

#define NONNULLARGS __attribute__((nonnull))
Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static enum RET_CODES parse_fat(const int fd)
((magic_mark & 0xFFFFFF00u) != FAT_MAGIC_1)
&& ((magic_mark & 0xFFFFFF00u) != FAT_MAGIC_2)
&& ((magic_mark & 0xFFFFFF00u) != FAT_MAGIC_3)
&& ((magic_mark & 0xFFFFFF00u) != FAT_MAGIC_4)
) {
printf("'NO FAT MAGIC FOUND'");
return FAIL_FAIL;
Expand Down

0 comments on commit c8a6925

Please sign in to comment.