linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n
@ 2014-03-04 10:57 Ezequiel Garcia
  2014-03-04 11:49 ` Artem Bityutskiy
  0 siblings, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2014-03-04 10:57 UTC (permalink / raw)
  To: Artem Bityutskiy, linux-mtd; +Cc: Ezequiel Garcia

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>
---
 drivers/mtd/ubi/ubi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index e76ff98..a8118f2 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -873,8 +873,8 @@ int ubiblock_del(struct ubi_volume_info *vi);
 #else
 static inline int ubiblock_init(void) { return 0; }
 static inline void ubiblock_exit(void) {}
-static inline int ubiblock_add(struct ubi_volume_info *vi) { return -ENOTTY; }
-static inline int ubiblock_del(struct ubi_volume_info *vi) { return -ENOTTY; }
+static inline int ubiblock_add(struct ubi_volume_info *vi) { return -ENOSYS; }
+static inline int ubiblock_del(struct ubi_volume_info *vi) { return -ENOSYS; }
 #endif
 
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-05 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 10:57 [PATCH] UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n Ezequiel Garcia
2014-03-04 11:49 ` Artem Bityutskiy
2014-03-04 12:14   ` Ezequiel Garcia
2014-03-04 13:00     ` Artem Bityutskiy
2014-03-05 13:30       ` Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).