]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Tue, 4 Mar 2014 10:57:43 +0000 (07:57 -0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 5 Mar 2014 13:48:35 +0000 (15:48 +0200)
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>
drivers/mtd/ubi/ubi.h

index 2e588a9809c9db91f385f722de60a54ff28d9765..0ba8b0a288381f80bf0aedfed61e9b3933baa604 100644 (file)
@@ -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