From 7968a2c1487207fb529438a70dd05ea010c65b9a Mon Sep 17 00:00:00 2001 From: pt3oyfief <1324428257@qq.com> Date: Thu, 23 Jun 2022 17:15:40 +0800 Subject: [PATCH] Update sys.c_1.1 --- sys.c_1.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys.c_1.1 b/sys.c_1.1 index ff1c184..169bd8a 100644 --- a/sys.c_1.1 +++ b/sys.c_1.1 @@ -377,7 +377,7 @@ int sys_getdents(unsigned int fd, struct dirent *dirp, unsigned int count) dirp_tmp->d_ino = d_entry->inode; dirp_tmp->d_off = 0; dirp_tmp->d_reclen = linux_dirent_size; - strcpy(dirp_tmp->d_name,dir_entry->name); + strcpy(dirp_tmp->d_name,d_entry->name); //将dirp_tmp的信息转化成char类型并存到buf //dirp_tmp(linux_dirent)--->buf(char) memcpy(buf,dirp_tmp,linux_dirent_size);