修改ns中设备的类型

This commit is contained in:
zhangzheng
2025-03-09 20:52:01 +08:00
parent a32d03667a
commit 66b79ce2ea
3 changed files with 2 additions and 91 deletions

View File

@@ -387,7 +387,7 @@ int fs_ns_readdir(int fd, struct dirent *_dir)
node_info = dir_info_cache_list[file->tmp_fd].info;
_dir->d_reclen = sizeof(*_dir);
_dir->d_type = node_info->type == NODE_TYPE_DUMMY ? DT_DIR : DT_REG; // DT_REG;
_dir->d_type = node_info->type == NODE_TYPE_DUMMY ? DT_DIR : DT_CHR; // DT_REG;
strncpy(_dir->d_name, node_info->name, sizeof(_dir->d_name));
_dir->d_name[sizeof(_dir->d_name) - 1] = 0;