From 4916337c5c7d932f8948c24e7a32ae17117531eb Mon Sep 17 00:00:00 2001 From: TNT_TS Date: Wed, 1 Jul 2026 23:34:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0mkfile=E5=88=AB?= =?UTF-8?q?=E5=90=8Dtouch=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E9=A1=B9=E5=8D=A0=E7=94=A82->16=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fs.c | 2 +- src/main.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fs.c b/src/fs.c index 4d6c498..390a106 100644 --- a/src/fs.c +++ b/src/fs.c @@ -372,7 +372,7 @@ int createDir(const char *path) { } /* 为子目录内容分配块(默认 2 块 = 128 字节 = 2 条目) */ - int subBlocks = 2; + int subBlocks = 16; int subStart = allocBlocks(subBlocks); if (subStart < 0) { logWrite(ERR, "createDir: failed to allocate %d blocks for dir", subBlocks); diff --git a/src/main.c b/src/main.c index dbc1665..29535b8 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,9 @@ int main(void) { shellRegister("mkfile", doMkfile, UNDERLINE "mkfile \n" COLOR_RESET "Create a file with given size"); + shellRegister("touch", doMkfile, + UNDERLINE "touch \n" COLOR_RESET + "Create a file with given size"); shellRegister("mkdir", doMkdir, UNDERLINE "mkdir \n" COLOR_RESET "Create a subdirectory"); shellRegister("rm", doRm,