设备驱动模型:完善platform bus相关内容。并注册串口到sysfs (#403)

* 完成初始化platform bus
* 删除旧的sysfs
* 把uart驱动移动到tty/serial文件夹下
* 完成将串口挂载到sysfs
* 修复vfs系统调用未能follow symlink的问题
* 修复shell未能正确获取pwd的问题
This commit is contained in:
LoGin
2023-10-20 22:11:33 +08:00
committed by GitHub
parent 06d5e24726
commit a03c4f9dee
61 changed files with 2904 additions and 1325 deletions

View File

@ -131,6 +131,7 @@ pid_t getpid(void);
int dup(int fd);
int dup2(int ofd, int nfd);
char *getcwd(char* buf, size_t size);
#if defined(__cplusplus)
} /* extern "C" */

View File

@ -235,4 +235,9 @@ int dup(int fd)
int dup2(int ofd, int nfd)
{
return syscall_invoke(SYS_DUP2, ofd, nfd, 0, 0, 0, 0, 0, 0);
}
char *getcwd(char* buf, size_t size)
{
return syscall_invoke(SYS_GETCWD, buf, size, 0, 0, 0, 0, 0, 0);
}