diff --git a/ports/src/noux/file_io_service.h b/ports/src/noux/file_io_service.h index 2147c2260..17e833c44 100644 --- a/ports/src/noux/file_io_service.h +++ b/ports/src/noux/file_io_service.h @@ -27,6 +27,12 @@ namespace Noux { virtual bool write(Sysio *sysio, Vfs_handle *vfs_handle) = 0; virtual bool read(Sysio *sysio, Vfs_handle *vfs_handle) = 0; virtual bool ftruncate(Sysio *sysio, Vfs_handle *vfs_handle) = 0; + + /** + * This method is only needed in file-systems which actually implement + * a device and is therefore false by default. + */ + virtual bool ioctl(Sysio *sysio, Vfs_handle *vfs_handle) { return false; } }; } diff --git a/ports/src/noux/vfs_handle.h b/ports/src/noux/vfs_handle.h index 0c655291f..594925141 100644 --- a/ports/src/noux/vfs_handle.h +++ b/ports/src/noux/vfs_handle.h @@ -79,6 +79,7 @@ namespace Noux { bool write(Sysio *sysio, Vfs_handle *handle) { return _msg("write"); } bool read(Sysio *sysio, Vfs_handle *handle) { return _msg("read"); } bool ftruncate(Sysio *sysio, Vfs_handle *handle) { return _msg("ftruncate"); } + bool ioctl(Sysio *sysio, Vfs_handle *handle) { return _msg("ioctl"); } }; static Pseudo_file_io_service fs; return &fs; diff --git a/ports/src/noux/vfs_io_channel.h b/ports/src/noux/vfs_io_channel.h index 1161b1820..0bc40fc86 100644 --- a/ports/src/noux/vfs_io_channel.h +++ b/ports/src/noux/vfs_io_channel.h @@ -136,6 +136,11 @@ namespace Noux { return 0; } + bool ioctl(Sysio *sysio) + { + return _fh->fs()->ioctl(sysio, _fh); + } + bool lseek(Sysio *sysio) { switch (sysio->lseek_in.whence) {