🆕 fat32文件系统的mkdir

This commit is contained in:
fslongjin
2022-06-25 20:55:59 +08:00
parent d7d449bddd
commit d775af70c7
15 changed files with 495 additions and 39 deletions

View File

@ -1,8 +1,11 @@
all: wait.o
all: wait.o stat.o
CFLAGS += -I .
wait.o: wait.c
gcc $(CFLAGS) -c wait.c -o wait.o
stat.o: stat.c
gcc $(CFLAGS) -c stat.c -o stat.o

View File

@ -0,0 +1,7 @@
#include "stat.h"
#include<libsystem/syscall.h>
int mkdir(const char *path, mode_t mode)
{
return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0,0,0,0,0,0);
}

View File

@ -0,0 +1,4 @@
#pragma once
#include <libc/sys/types.h>
int mkdir(const char *path, mode_t mode);

View File

@ -21,6 +21,7 @@
#define SYS_EXECVE 14 // 执行新的应用程序
#define SYS_WAIT4 15 // 等待进程退出
#define SYS_EXIT 16 // 进程退出
#define SYS_MKDIR 17 // 创建文件夹
/**
* @brief 用户态系统调用函数