rt-thread icon indicating copy to clipboard operation
rt-thread copied to clipboard

milk-v duo开发板移植RT-Thread Smart出现'struct rt_device' has no member named 'ops'; did you mean 'fops'?报错

Open 2021zhangyixu opened this issue 2 years ago • 2 comments

昨天我朋友尝试用duo移植RT-Thread Smart,后面他说出现了报错。我跟着尝试了一下,发现确实存在这个问题。之后我修改了components/dfs/dfs_v2/filesystems/devfs/devfs.c文件中的285行,315行,347行,378行,420行的ops为fops。最终编译通过了,上机测试也没有问题。 cd0d3934d3551ab2fb7eb443fd30332 可能是某位大佬写的时候不小心将ops和fops弄混了。 10ed4bd4a06d4ce2a9f1be37240fbdc

2021zhangyixu avatar Dec 26 '23 04:12 2021zhangyixu

@geniusgogo 是否和某个PR相关?

BernardXiong avatar Dec 26 '23 11:12 BernardXiong

SMART 现在强制选用 DFS 2.0 了。然后 dfs 2.0 的 devfs 只支持 fops 形式的 RT device 原型。所以有些旧的驱动要主动更新一下。risc-v 的 bsp 就有很多这个问题。

至于这个 issue 提到的问题,可能是一些条件编译的代码没来得及调整了。

polarvid avatar Jan 05 '24 09:01 polarvid