From f6154bfed3e3584a80369ff2e694fe10152785cf Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Thu, 27 Aug 2026 01:21:15 +0800 Subject: [PATCH] =?UTF-8?q?debug(fat32):=20dir=5Ffind=20=E6=89=93=E5=8D=B0?= =?UTF-8?q?=20sfn=5Ffrom=5Flfn=20=E7=94=9F=E6=88=90=E7=9A=84=2011=20?= =?UTF-8?q?=E5=AD=97=E8=8A=82=20hex=E2=80=94=E2=80=94hello.elf=20=E7=9A=84?= =?UTF-8?q?=20sfn=20=E6=98=BE=E7=A4=BA=E4=B8=BA=20H=EF=BC=88sfn[1]=3D0x00?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E5=AE=9A=E4=BD=8D=20sfn=20=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=A2=AB=E7=A0=B4=E5=9D=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VKernel/Kernel/drivers/fs/fat32/fat32_types.vp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VKernel/Kernel/drivers/fs/fat32/fat32_types.vp b/VKernel/Kernel/drivers/fs/fat32/fat32_types.vp index 71eac35..b55e399 100644 --- a/VKernel/Kernel/drivers/fs/fat32/fat32_types.vp +++ b/VKernel/Kernel/drivers/fs/fat32/fat32_types.vp @@ -719,6 +719,12 @@ class volinfo: def dir_find(self, dp: dirobj | t.CPtr, name: t.CConst | t.CChar | t.CPtr, lfn_buf: t.CUInt16T | t.CPtr) -> FRESULT: sfn: t.CArray[t.CChar, 12] sfn_from_lfn(name, c.Addr(sfn[0])) + # [DIAG] sfn 生成字节 hex(hello.elf 应 HELLO..ELF,异常时显示 sfn=H) + _dbhs: t.CArray[t.CChar, 64] + viperlib.snprintf(c.Addr(_dbhs), 64, "[sfn] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", + sfn[0], sfn[1], sfn[2], sfn[3], sfn[4], sfn[5], + sfn[6], sfn[7], sfn[8], sfn[9], sfn[10]) + serial.puts(c.Addr(_dbhs)) _dbg_sfn: t.CArray[t.CChar, 16] _si: t.CInt for _si in range(11):