summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2014-03-04 10:57:43 (GMT)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-03-05 13:48:35 (GMT)
commit80744cc92207baa913ac9575374738b6298032eb (patch)
tree7f600e92514cf2ce65fef26b868947fcd7fd31c9 /drivers/mtd/ubi/ubi.h
parent22d3ee5c48cbae136cb44aa812c562117ff6df29 (diff)
downloadlinux-80744cc92207baa913ac9575374738b6298032eb.tar.xz
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: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 2e588a9..0ba8b0a 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -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