Skip to contentSkip to conversation

reiser4: return -ENOTTY from unsupported ioctls.

PATCH New Ivan Shapovalov 1 participant 1 message Feb 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiser4: return -ENOTTY from unsupported ioctls.

---

Looks like -ENOTTY is the right thing to return here.
(also specified at http://man7.org/linux/man-pages/man2/ioctl.2.html#ERRORS)

 fs/reiser4/plugin/file/cryptcompress.c | 2 +-
 fs/reiser4/plugin/file/file.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/reiser4/plugin/file/cryptcompress.c +1 -1
index c3e0948..73f6974 100644
@@ -3682,7 +3682,7 @@ int writepages_cryptcompress(struct address_space *mapping,
 int ioctl_cryptcompress(struct file *filp, unsigned int cmd,
 			unsigned long arg)
 {
-	return RETERR(-ENOSYS);
+	return RETERR(-ENOTTY);
 }
 
 /* plugin->mmap */
fs/reiser4/plugin/file/file.c +1 -1
index c33f789..1040c994 100644
@@ -2453,7 +2453,7 @@ int ioctl_unix_file(struct file *filp, unsigned int cmd,
 		break;
 
 	default:
-		result = RETERR(-ENOSYS);
+		result = RETERR(-ENOTTY);
 		break;
 	}
 	reiser4_exit_context(ctx);
Signature · 1 line
2.3.0