Skip to content

Commit

Permalink
UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ezequiel Garcia authored and Artem Bityutskiy committed Mar 5, 2014
1 parent 22d3ee5 commit 80744cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/ubi/ubi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 80744cc

Please sign in to comment.