mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 19:36:47 +00:00
注释修改
This commit is contained in:
parent
ee9658b5d5
commit
005b962f33
@ -85,7 +85,8 @@ static long devfs_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir
|
|||||||
++file_ptr->position;
|
++file_ptr->position;
|
||||||
// 获取目标dentry(由于是子目录项,因此是child_node_list)
|
// 获取目标dentry(由于是子目录项,因此是child_node_list)
|
||||||
struct vfs_dir_entry_t *target_dent = container_of(list, struct vfs_dir_entry_t, child_node_list);
|
struct vfs_dir_entry_t *target_dent = container_of(list, struct vfs_dir_entry_t, child_node_list);
|
||||||
kdebug("target name=%s, namelen=%d", target_dent->name, target_dent->name_length);
|
// kdebug("target name=%s, namelen=%d", target_dent->name, target_dent->name_length);
|
||||||
|
|
||||||
char *name = (char *)kzalloc(target_dent->name_length + 1, 0);
|
char *name = (char *)kzalloc(target_dent->name_length + 1, 0);
|
||||||
strncpy(name, target_dent->name, target_dent->name_length);
|
strncpy(name, target_dent->name, target_dent->name_length);
|
||||||
uint32_t dentry_type;
|
uint32_t dentry_type;
|
||||||
|
@ -210,7 +210,7 @@ int shell_cmd_cd(int argc, char **argv)
|
|||||||
new_path[current_dir_len] = '/';
|
new_path[current_dir_len] = '/';
|
||||||
strcat(new_path, argv[1] + dest_offset);
|
strcat(new_path, argv[1] + dest_offset);
|
||||||
int x = chdir(new_path);
|
int x = chdir(new_path);
|
||||||
printf("chdir: retval=%d\n",x);
|
|
||||||
if (x == 0) // 成功切换目录
|
if (x == 0) // 成功切换目录
|
||||||
{
|
{
|
||||||
free(shell_current_path);
|
free(shell_current_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user