Skip to content

Commit c4d17fc

Browse files
authored
Merge pull request #487 from ojeda/enotty
rust: kernel: ioctl returns ENOTTY if not implemented
2 parents 9740bcb + e135748 commit c4d17fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/kernel/file_operations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ pub trait FileOperations: Send + Sync + Sized {
662662
_file: &File,
663663
_cmd: &mut IoctlCommand,
664664
) -> Result<i32> {
665-
Err(Error::EINVAL)
665+
Err(Error::ENOTTY)
666666
}
667667

668668
/// Performs 32-bit IO control operations on that are specific to the file on 64-bit kernels.
@@ -673,7 +673,7 @@ pub trait FileOperations: Send + Sync + Sized {
673673
_file: &File,
674674
_cmd: &mut IoctlCommand,
675675
) -> Result<i32> {
676-
Err(Error::EINVAL)
676+
Err(Error::ENOTTY)
677677
}
678678

679679
/// Syncs pending changes to this file.

0 commit comments

Comments
 (0)