mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
🆕 fat32文件系统的mkdir
This commit is contained in:
@ -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
|
7
user/libs/libc/sys/stat.c
Normal file
7
user/libs/libc/sys/stat.c
Normal 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);
|
||||
}
|
4
user/libs/libc/sys/stat.h
Normal file
4
user/libs/libc/sys/stat.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include <libc/sys/types.h>
|
||||
|
||||
int mkdir(const char *path, mode_t mode);
|
Reference in New Issue
Block a user