mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
完善设备驱动模型,基于kset、kobj来维护对象之间的关系 (#401)
* 使用kobj和kset管理/sys文件夹下的对象 * 修改notifier,把action从u64换为泛型。 * 完善设备驱动模型,基于kset、kobj来维护对象之间的关系
This commit is contained in:
@ -339,9 +339,11 @@ int shell_cmd_cat(int argc, char **argv)
|
||||
int l = read(fd, buf, 511);
|
||||
if (l < 0)
|
||||
{
|
||||
printf("ERROR: Cannot read file: %s\n", file_path);
|
||||
printf("ERROR: Cannot read file: %s, errno = %d\n", file_path, errno);
|
||||
return -1;
|
||||
}
|
||||
if (l == 0)
|
||||
break;
|
||||
buf[l] = '\0';
|
||||
|
||||
file_size -= l;
|
||||
|
Reference in New Issue
Block a user