提交 80744cc9 编写于 作者: E Ezequiel Garcia 提交者: Artem Bityutskiy

UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n

In order to have a way of distinguishing an invalid ioctl from a
not supported (but otherwise valid) ioctl, this commit changes the
return value of the ioctl stubs from ENOTTY to ENOSYS.

This will be useful to report more accurate error messages from
userspace tools.
Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
上级 22d3ee5c
......@@ -875,11 +875,11 @@ static inline int ubiblock_init(void) { return 0; }
static inline void ubiblock_exit(void) {}
static inline int ubiblock_create(struct ubi_volume_info *vi)
{
return -ENOTTY;
return -ENOSYS;
}
static inline int ubiblock_remove(struct ubi_volume_info *vi)
{
return -ENOTTY;
return -ENOSYS;
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册