From f65c5158a584765a03b102732be1df1ebd4fc306 Mon Sep 17 00:00:00 2001 From: zhouzilong <529620861@qq.com> Date: Thu, 2 Feb 2023 14:31:55 -0500 Subject: [PATCH] fix: changed the data type of inum in struct dirent from ushort to uint for consistency --- kernel/fs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/fs.h b/kernel/fs.h index 139dcc9c37..05575b5fcd 100644 --- a/kernel/fs.h +++ b/kernel/fs.h @@ -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]; };