Skip to content

Commit

Permalink
fix: changed the data type of inum in struct dirent from ushort to ui…
Browse files Browse the repository at this point in the history
…nt for consistency
  • Loading branch information
zhouzilong2020 committed Feb 2, 2023
1 parent f5b93ef commit f65c515
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ struct dinode {
#define BBLOCK(b, sb) ((b)/BPB + sb.bmapstart)

// Directory is a file containing a sequence of dirent structures.
#define DIRSIZ 14
// Setting DIRSIZ to 12 makes sizeof(struct dirent) a multiple of 16.
#define DIRSIZ 12

struct dirent {
ushort inum;
uint inum;
char name[DIRSIZ];
};

0 comments on commit f65c515

Please sign in to comment.