From 629a7970ebb0902383db6cbc003e5bc248ff76d6 Mon Sep 17 00:00:00 2001 From: CXSforHPU <19511928573@163.com> Date: Sat, 7 Nov 2026 17:16:10 +0800 Subject: [components][dfs]Class-encode RT_DEVICE_CTRL_* commands to fix POSIX/dev command collisions: class in high byte, index low byte. --- components/utilities/rt-link/src/rtlink_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/utilities/rt-link/src/rtlink_dev.c') diff --git a/components/utilities/rt-link/src/rtlink_dev.c b/components/utilities/rt-link/src/rtlink_dev.c index b4f1add678..b130b27927 100644 --- a/components/utilities/rt-link/src/rtlink_dev.c +++ b/components/utilities/rt-link/src/rtlink_dev.c @@ -320,7 +320,7 @@ rt_err_t rt_link_dev_control(rt_device_t dev, int cmd, void *args) { RT_ASSERT(dev != RT_NULL); - if (cmd & RT_DEVICE_CTRL_CONFIG) + if ((cmd & ~RT_LINK_DEVICE_MASK) == RT_DEVICE_CTRL_CONFIG) { if (args == RT_NULL) return -RT_EINVAL; -- cgit v1.3.1