Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Dummy Implementation and not implemented functions in drivers. #677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented Nov 13, 2024

Description

This PR is for improving drive implementation, especially trying to identify those specific drivers that require a concrete value to be returned.

So far I have created another macro DUMMY_IMPLEMENTATION which just do:

int dummy_implementation_int(void) { return 0; }

This PR needs to be reviewed carefully as it has several changes, let me enumerate them:

  • init and deinit functions now always used either a custom function or a DUMMY_IMPLEMENTATION
  • All the functions that were return 0; were replaced to NOT_SUPPORTED (the ones that required s64 as return are using NOT_SUPPORTED_S64).
  • In the driver definition every single function has now a comment, which helps us to read the driver better.
  • Several functions were removed and replaced with DUMMY_IMPLEMENTATION or NOT_SUPPORTED.
  • In general I think it is a super good approach to return NOT_IMPLEMENTED for all these functions that aren't doing anything.

This PR as it is right now will raise most probably several issues, so the main scope of this PR is to identify together in each driver what are the specific functions that require concrete DUMMY_IMPLEMENTATION rather than NOT_SUPPORTED.

Please help me to identify them and then put a clear comment with the reason.

To test with OPL could be a good test, however, we need to keep in mind that, if it is not working maybe it is because OPL code itself needs to be updated.

Here you have all the drivers, the functions, and the previous and new value.
So far we have the next different kind of drivers:

  • iop_device_ops_short_t

  • iop_device_ops_t

  • iomanX_iop_device_ops_t

  • ee/iopreboot/src/imgdrv/src/imgdrv.c

static iop_device_ops_short_t imgdrv_ops = {
    DUMMY_IMPLEMENTATION, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => NULL
    NOT_SUPPORTED, // open => OK
    NOT_SUPPORTED, // close => OK
    &imgdrv_read, // read => OK
    NOT_SUPPORTED, // write => NULL
    &imgdrv_lseek, // lseek => OK
};
  • iop/arcade/accdvd/src/cddrv.c
static iop_device_ops_t Cddrv_ops = {
	&cddrv_adddrv, // init => OK
	&cddrv_deldrv, // deinit => OK
	NOT_SUPPORTED, // format => EINVAL
	&cddrv_open, // open => OK
	&cddrv_close, // close => OK
	&cddrv_read, // read => OK
	&cddrv_write, // write => OK
	&cddrv_lseek, // lseek => OK
	&cddrv_ioctl, // ioctl => OK
	NOT_SUPPORTED, // remove => EINVAL
	NOT_SUPPORTED, // mkdir => EINVAL
	NOT_SUPPORTED, // rmdir => EINVAL
	NOT_SUPPORTED, // dopen => EINVAL
	NOT_SUPPORTED, // dclose => EINVAL
	NOT_SUPPORTED, // dread => EINVAL
	NOT_SUPPORTED, // getstat => EINVAL
	NOT_SUPPORTED, // chstat => EINVAL
};
  • iop/arcade/acuart/src/tty.c
static iop_device_ops_t uart_ops = {
    DUMMY_IMPLEMENTATION, // init => ENOTSUP
    DUMMY_IMPLEMENTATION, // deinit => ENOTSUP
    NOT_SUPPORTED, // format => OK
    NOT_SUPPORTED, // open => OK
    NOT_SUPPORTED, // close => OK
    &acuart_read, // read => OK
    &acuart_write, // write => OK
    NOT_SUPPORTED, // lseek => OK
    NOT_SUPPORTED, // ioctl => OK
    NOT_SUPPORTED, // remove => OK
    NOT_SUPPORTED, // mkdir => OK
    NOT_SUPPORTED, // rmdir => OK
    NOT_SUPPORTED, // dopen => OK
    NOT_SUPPORTED, // dclose => OK
    NOT_SUPPORTED, // dread => OK
    NOT_SUPPORTED, // getstat => OK
    NOT_SUPPORTED, // chstat => OK
};
  • iop/cdvd/cdfs/src/main.c
static iop_device_ops_t fio_ops = {
    &fio_init, // init => OK
    &fio_deinit, // deinit => OK
    NOT_SUPPORTED, // format => EIO
    &fio_open, // open => OK
    &fio_close, // close => OK
    &fio_read, // read => OK
    &fio_write, // write => OK
    &fio_lseek, // lseek => OK
    NOT_SUPPORTED, // ioctl => EIO
    NOT_SUPPORTED, // remove => EIO
    NOT_SUPPORTED, // mkdir => EIO
    NOT_SUPPORTED, // rmdir => EIO
    &fio_openDir, // dopen => OK
    &fio_closeDir, // dclose => OK
    &fio_dread, // dread => OK
    &fio_getstat, // getstat => OK
    NOT_SUPPORTED, // chstat => EIO
};
  • iop/cdvd/xesdrv/src/xesdrv.c
static iomanX_iop_device_ops_t DvrFuncTbl = {
	&esdrv_df_init, // init => OK
	&esdrv_df_exit, // deinit => OK
	NOT_SUPPORTED, // format => OK
	NOT_SUPPORTED, // open => OK
	NOT_SUPPORTED, // close => OK
	NOT_SUPPORTED, // read => OK
	NOT_SUPPORTED, // write => OK
	NOT_SUPPORTED, // lseek => OK
	&esdrv_df_ioctl, // ioctl => OK
	NOT_SUPPORTED, // remove => OK
	NOT_SUPPORTED, // mkdir => OK
	NOT_SUPPORTED, // rmdir => OK
	NOT_SUPPORTED, // dopen => OK
	NOT_SUPPORTED, // dclose => OK
	NOT_SUPPORTED, // dread => OK
	NOT_SUPPORTED, // getstat => OK
	NOT_SUPPORTED, // chstat => OK
	NOT_SUPPORTED, // rename => OK
	NOT_SUPPORTED, // chdir => OK
	NOT_SUPPORTED, // sync => OK
	NOT_SUPPORTED, // mount => OK
	NOT_SUPPORTED, // umount => OK
	NOT_SUPPORTED_S64, // lseek64 => OK
	&esdrv_df_devctl, // devctl => OK
	NOT_SUPPORTED, // symlink => OK
	NOT_SUPPORTED, // readlink => OK
	&esdrv_df_ioctl2, // ioctl2 => OK
};
  • iop/debug/iop_sbusdbg/src/sbus_tty.c
static iop_device_ops_t fsd_ops =
{
    &ttyfs_init, // init => OK
    &ttyfs_deinit, // deinit => OK
    NOT_SUPPORTED, // format => EPERM
    &ttyfs_open, // open => OK
    &ttyfs_close, // close => OK
    NOT_SUPPORTED, // read => EPERM
    &ttyfs_write, // write => OK
    NOT_SUPPORTED, // lseek => EPERM
    NOT_SUPPORTED, // ioctl => EPERM
    NOT_SUPPORTED, // remove => EPERM
    NOT_SUPPORTED, // mkdir => EPERM
    NOT_SUPPORTED, // rmdir => EPERM
    &ttyfs_dopen, // dopen => OK
    &ttyfs_close, // dclose => OK
    NOT_SUPPORTED, // dread => EPERM
    NOT_SUPPORTED, // getstat => EPERM
    NOT_SUPPORTED, // chstat => EPERM
};
  • iop/debug/ppctty/src/tty.c
static iop_device_ops_t fsd_ops =
{
    &ttyfs_init, // init => OK
    &ttyfs_deinit, // deinit => OK
    NOT_SUPPORTED, // format => EPERM
    NOT_SUPPORTED, // open => EPERM
    NOT_SUPPORTED, // close => EPERM
    NOT_SUPPORTED, // read => EPERM
    &ttyfs_write, // write => OK
    NOT_SUPPORTED, // lseek => EPERM
    NOT_SUPPORTED, // ioctl => EPERM
    NOT_SUPPORTED, // remove => EPERM
    NOT_SUPPORTED, // mkdir => EPERM
    NOT_SUPPORTED, // rmdir => EPERM
    NOT_SUPPORTED, // dopen => EPERM
    NOT_SUPPORTED, // dclose => EPERM
    NOT_SUPPORTED, // dread => EPERM
    NOT_SUPPORTED, // getstat => EPERM
    NOT_SUPPORTED, // chstat => EPERM
};
  • iop/dev9/dev9/src/ps2dev9.c
static iop_device_ops_t dev9x_ops =
    {
        DUMMY_IMPLEMENTATION, // init => 0
        DUMMY_IMPLEMENTATION, // deinit => 0
        NOT_SUPPORTED, // format => 0
        NOT_SUPPORTED, // open => 0
        NOT_SUPPORTED, // close => 0
        NOT_SUPPORTED, // read => 0
        NOT_SUPPORTED, // write => 0
        NOT_SUPPORTED, // lseek => 0
        NOT_SUPPORTED, // ioctl => 0
        NOT_SUPPORTED, // remove => 0
        NOT_SUPPORTED, // mkdir => 0
        NOT_SUPPORTED, // rmdir => 0
        NOT_SUPPORTED, // dopen => 0
        NOT_SUPPORTED, // dclose => 0
        NOT_SUPPORTED, // dread => 0
        NOT_SUPPORTED, // getstat => 0
        NOT_SUPPORTED, // chstat => 0
        NOT_SUPPORTED, // rename => 0
        NOT_SUPPORTED, // chdir => 0
        NOT_SUPPORTED, // sync => 0
        NOT_SUPPORTED, // mount => 0
        NOT_SUPPORTED, // umount => 0
        NOT_SUPPORTED_S64, // lseek64 => 0
        &dev9x_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => 0
        NOT_SUPPORTED, // readlink => 0
        NOT_SUPPORTED, // ioctl2 => 0
};
  • iop/dvrp/dvr/src/dvr.c
static iomanX_iop_device_ops_t DvrFuncTbl =
    {
        &dvr_df_init, // init => OK
        &dvr_df_exit, // deinit => OK
        NOT_SUPPORTED, // format => OK
        NOT_SUPPORTED, // open => OK
        NOT_SUPPORTED, // close => OK
        NOT_SUPPORTED, // read => OK
        NOT_SUPPORTED, // write => OK
        NOT_SUPPORTED, // lseek => OK
        &dvr_df_ioctl, // ioctl => OK
        NOT_SUPPORTED, // remove => OK
        NOT_SUPPORTED, // mkdir => OK
        NOT_SUPPORTED, // rmdir => OK
        NOT_SUPPORTED, // dopen => OK
        NOT_SUPPORTED, // dclose => OK
        NOT_SUPPORTED, // dread => OK
        NOT_SUPPORTED, // getstat => OK
        NOT_SUPPORTED, // chstat => OK
        NOT_SUPPORTED, // rename => OK
        NOT_SUPPORTED, // chdir => OK
        NOT_SUPPORTED, // sync => OK
        NOT_SUPPORTED, // mount => OK
        NOT_SUPPORTED, // umount => OK
        NOT_SUPPORTED_S64, // lseek64 => OK
        &dvr_df_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => OK
        NOT_SUPPORTED, // readlink => OK
        &dvr_df_ioctl2, // ioctl2 => OK
};
  • iop/dvrp/dvrav/src/dvrav.c
static iomanX_iop_device_ops_t DvrFuncTbl =
    {
        &dvrav_df_init, // init => OK
        &dvrav_df_exit, // deinit => OK
        NOT_SUPPORTED, // format => OK
        NOT_SUPPORTED, // open => OK
        NOT_SUPPORTED, // close => OK
        NOT_SUPPORTED, // read => OK
        NOT_SUPPORTED, // write => OK
        NOT_SUPPORTED, // lseek => OK
        &dvrav_df_ioctl, // ioctl => OK
        NOT_SUPPORTED, // remove => OK
        NOT_SUPPORTED, // mkdir => OK
        NOT_SUPPORTED, // rmdir => OK
        NOT_SUPPORTED, // dopen => OK
        NOT_SUPPORTED, // dclose => OK
        NOT_SUPPORTED, // dread => OK
        NOT_SUPPORTED, // getstat => OK
        NOT_SUPPORTED, // chstat => OK
        NOT_SUPPORTED, // rename => OK
        NOT_SUPPORTED, // chdir => OK
        NOT_SUPPORTED, // sync => OK
        NOT_SUPPORTED, // mount => OK
        NOT_SUPPORTED, // umount => OK
        NOT_SUPPORTED_S64, // lseek64 => OK
        &dvrav_df_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => OK
        NOT_SUPPORTED, // readlink => OK
        &dvrav_df_ioctl2, // ioctl2 => OK
};
  • iop/dvrp/dvrdv/src/dvrdv.c
static iomanX_iop_device_ops_t DvrFuncTbl =
    {
        &dvrdv_df_init, // init => OK
        &dvrdv_df_exit, // deinit => OK
        NOT_SUPPORTED, // format => OK
        NOT_SUPPORTED, // open => OK
        NOT_SUPPORTED, // close => OK
        NOT_SUPPORTED, // read => OK
        NOT_SUPPORTED, // write => OK
        NOT_SUPPORTED, // lseek => OK
        &dvrdv_df_ioctl, // ioctl => OK
        NOT_SUPPORTED, // remove => OK
        NOT_SUPPORTED, // mkdir => OK
        NOT_SUPPORTED, // rmdir => OK
        NOT_SUPPORTED, // dopen => OK
        NOT_SUPPORTED, // dclose => OK
        NOT_SUPPORTED, // dread => OK
        NOT_SUPPORTED, // getstat => OK
        NOT_SUPPORTED, // chstat => OK
        NOT_SUPPORTED, // rename => OK
        NOT_SUPPORTED, // chdir => OK
        NOT_SUPPORTED, // sync => OK
        NOT_SUPPORTED, // mount => OK
        NOT_SUPPORTED, // umount => OK
        NOT_SUPPORTED_S64, // lseek64 => OK
        &dvrdv_df_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => OK
        NOT_SUPPORTED, // readlink => OK
        &dvrdv_df_ioctl2, // ioctl2 => OK
};
  • iop/dvrp/dvrfile/src/dvrfile.c
static iomanX_iop_device_ops_t dvrf_translator_functbl = {
    dvrf_df_init, // init => OK
    dvrf_df_exit, // deinit => OK
    dvrf_translator_df_format, // format => OK
    dvrf_translator_df_open, // open => OK
    dvrf_df_close, // close => OK
    dvrf_df_read, // read => OK
    dvrf_df_write, // write => OK
    dvrf_df_lseek, // lseek => OK
    dvrf_df_ioctl, // ioctl => OK
    dvrf_translator_df_remove, // remove => OK
    dvrf_translator_df_mkdir, // mkdir => OK
    dvrf_translator_df_rmdir, // rmdir => OK
    dvrf_translator_df_dopen, // dopen => OK
    dvrf_df_dclose, // dclose => OK
    dvrf_df_dread, // dread => OK
    dvrf_translator_df_getstat, // getstat => OK
    dvrf_translator_df_chstat, // chstat => OK
    dvrf_translator_df_rename, // rename => OK
    dvrf_translator_df_chdir, // chdir => OK
    dvrf_translator_df_sync, // sync => OK
    dvrf_translator_df_mount, // mount => OK
    dvrf_translator_df_umount, // umount => OK
    dvrf_df_lseek64, // lseek64 => OK
    dvrf_translator_df_devctl, // devctl => OK
    dvrf_translator_df_symlink, // symlink => OK
    dvrf_translator_df_readlink, // readlink => OK
    dvrf_df_ioctl2, // ioctl2 => OK
};
  • iop/dvrp/dvripl/src/dvripl.c
static iomanX_iop_device_ops_t DvrFuncTbl =
    {
        &dvripl_df_init, // init => OK
        &dvripl_df_exit, // deinit => OK
        NOT_SUPPORTED, // format => OK
        NOT_SUPPORTED, // open => OK
        NOT_SUPPORTED, // close => OK
        NOT_SUPPORTED, // read => OK
        NOT_SUPPORTED, // write => OK
        NOT_SUPPORTED, // lseek => OK
        &dvripl_df_ioctl, // ioctl => OK
        NOT_SUPPORTED, // remove => OK
        NOT_SUPPORTED, // mkdir => OK
        NOT_SUPPORTED, // rmdir => OK
        NOT_SUPPORTED, // dopen => OK
        NOT_SUPPORTED, // dclose => OK
        NOT_SUPPORTED, // dread => OK
        NOT_SUPPORTED, // getstat => OK
        NOT_SUPPORTED, // chstat => OK
        NOT_SUPPORTED, // rename => OK
        NOT_SUPPORTED, // chdir => OK
        NOT_SUPPORTED, // sync => OK
        NOT_SUPPORTED, // mount => OK
        NOT_SUPPORTED, // umount => OK
        NOT_SUPPORTED_S64, // lseek64 => OK
        &dvripl_df_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => OK
        NOT_SUPPORTED, // readlink => OK
        &dvripl_df_ioctl2, // ioctl2 => OK
};
  • iop/dvrp/dvrmisc/src/dvrmisc.c
static iomanX_iop_device_ops_t DvrFuncTbl =
    {
        &dvrmisc_df_init, // init => OK
        &dvrmisc_df_exit, // deinit => OK
        NOT_SUPPORTED, // format => OK
        NOT_SUPPORTED, // open => OK
        NOT_SUPPORTED, // close => OK
        NOT_SUPPORTED, // read => OK
        NOT_SUPPORTED, // write => OK
        NOT_SUPPORTED, // lseek => OK
        &dvrmisc_df_ioctl, // ioctl => OK
        NOT_SUPPORTED, // remove => OK
        NOT_SUPPORTED, // mkdir => OK
        NOT_SUPPORTED, // rmdir => OK
        NOT_SUPPORTED, // dopen => OK
        NOT_SUPPORTED, // dclose => OK
        NOT_SUPPORTED, // dread => OK
        NOT_SUPPORTED, // getstat => OK
        NOT_SUPPORTED, // chstat => OK
        NOT_SUPPORTED, // rename => OK
        NOT_SUPPORTED, // chdir => OK
        NOT_SUPPORTED, // sync => OK
        NOT_SUPPORTED, // mount => OK
        NOT_SUPPORTED, // umount => OK
        NOT_SUPPORTED_S64, // lseek64 => OK
        &dvrmisc_df_devctl, // devctl => OK
        NOT_SUPPORTED, // symlink => OK
        NOT_SUPPORTED, // readlink => OK
        &dvrmisc_df_ioctl2, // ioctl2 => OK
    };
  • iop/fs/bdmfs_fatfs/src/fs_driver.c
static iop_device_ops_t fs_functarray = {
    DUMMY_IMPLEMENTATION, // init => 1
    DUMMY_IMPLEMENTATION, // deinit => EOI
    NOT_SUPPORTED, // format => OK
    &fs_open, // open => OK
    &fs_close, // close => OK
    &fs_read, // read => OK
    &fs_write, // write => OK
    &fs_lseek, // lseek => OK
    &fs_ioctl, // ioctl => OK
    &fs_remove, // remove => OK
    &fs_mkdir, // mkdir => OK
    &fs_remove, // rmdir => OK
    &fs_dopen, // dopen => OK
    &fs_dclose, // dclose => OK
    &fs_dread, // dread => OK
    &fs_getstat, // getstat => OK
    NOT_SUPPORTED, // chstat => EOI
    &fs_rename, // rename => OK
    NOT_SUPPORTED, // chdir => EOI
    NOT_SUPPORTED, // sync => EOI
    NOT_SUPPORTED, // mount => EOI
    NOT_SUPPORTED, // umount => EOI
    &fs_lseek64, // lseek64 => OK
    &fs_devctl, // devctl => OK
    NOT_SUPPORTED, // symlink => EOI
    NOT_SUPPORTED, // readlink => EOI
    &fs_ioctl2, // ioctl2 => OK
};
  • iop/fs/devfs/src/devfs.c
static iop_device_ops_t devfs_ops = {
    DUMMY_IMPLEMENTATION, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => EPERM
    &devfs_open, // open => OK
    &devfs_close, // close => OK
    &devfs_read, // read => OK
    NOT_SUPPORTED, // write => EPERM
    NOT_SUPPORTED, // lseek => EPERM
    &devfs_ioctl, // ioctl => OK
    NOT_SUPPORTED, // remove => EPERM
    NOT_SUPPORTED, // mkdir => EPERM
    NOT_SUPPORTED, // rmdir => EPERM
    &devfs_dopen, // dopen => OK
    &devfs_dclose, // dclose => OK
    &devfs_dread, // dread => OK
    &devfs_getstat, // getstat => OK
    NOT_SUPPORTED, // chstat => EPERM
    NOT_SUPPORTED, // rename => EPERM
    NOT_SUPPORTED, // chdir => EPERM
    NOT_SUPPORTED, // sync => EPERM
    NOT_SUPPORTED, // mount => EPERM
    NOT_SUPPORTED, // umount => EPERM
    NOT_SUPPORTED_S64, // lseek64 => EPERM
    NOT_SUPPORTED, // devctl => EPERM
    NOT_SUPPORTED, // symlink => EPERM
    NOT_SUPPORTED, // readlink => EPERM
    &devfs_ioctl2, // ioctl2 => OK
  };
  • iop/fs/eromdrv/src/eromdrv.c
  static iop_device_ops_t erom_devops = {
	DUMMY_IMPLEMENTATION, // init => OK
	DUMMY_IMPLEMENTATION, // deinit => OK
	NOT_SUPPORTED, // format => 0
	erom_op_open, // open => OK
	erom_op_close, // close => OK
	erom_op_read, // read => OK
	NOT_SUPPORTED, // write => EOI
	erom_op_lseek, // lseek => OK
	NOT_SUPPORTED, // ioctl => 0
	NOT_SUPPORTED, // remove => 0
	NOT_SUPPORTED, // mkdir => 0
	NOT_SUPPORTED, // rmdir => 0
	NOT_SUPPORTED, // dopen => 0
	NOT_SUPPORTED, // dclose => 0
	NOT_SUPPORTED, // dread => 0
	NOT_SUPPORTED, // getstat => 0
	NOT_SUPPORTED, // chstat => 0
};
  • iop/fs/fakehost/src/fakehost.c
static iop_io_device_ops_t functions = {
	DUMMY_IMPLEMENTATION, // init
	DUMMY_IMPLEMENTATION, // deinit
	NOT_SUPPORTED, // format
	&fd_open, // open
	&fd_close, // close
	&fd_read, // read
	NOT_SUPPORTED, // write
	&fd_lseek, // lseek
	NOT_SUPPORTED, // ioctl
	NOT_SUPPORTED, // remove
	NOT_SUPPORTED, // mkdir
	NOT_SUPPORTED, // rmdir
	NOT_SUPPORTED, // dopen
	NOT_SUPPORTED, // dclose
	NOT_SUPPORTED, // dread
	NOT_SUPPORTED, // getstat
	NOT_SUPPORTED, // chstat
};
  • iop/fs/http/src/ps2http.c
static iop_io_device_ops_t ps2httpOps = {
	DUMMY_IMPLEMENTATION, // init => OK
	DUMMY_IMPLEMENTATION, // deinit => OK
	NOT_SUPPORTED, // format => EOI
	&httpOpen, // open => OK
	&httpClose, // close => OK
	&httpRead, // read => OK
	NOT_SUPPORTED, // write => EOI
	&httpLseek, // lseek => OK
	NOT_SUPPORTED, // ioctl => EOI
	NOT_SUPPORTED, // remove => EOI
	NOT_SUPPORTED, // mkdir => EOI
	NOT_SUPPORTED, // rmdir => EOI
	NOT_SUPPORTED, // dopen => EOI
	NOT_SUPPORTED, // dclose => EOI
	NOT_SUPPORTED, // dread => EOI
	NOT_SUPPORTED, // getstat => EOI
	NOT_SUPPORTED, // chstat => EOI
};
  • iop/fs/romdrv/src/romdrv.c
static iop_device_ops_t ops = {
    DUMMY_IMPLEMENTATION, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => 0
    &romOpen, // open => OK
    &romClose, // close => OK
    &romRead, // read => OK
    NOT_SUPPORTED, // write => 0
    &romLseek, // lseek => OK
    NOT_SUPPORTED, // ioctl => 0
    NOT_SUPPORTED, // remove => 0
    NOT_SUPPORTED, // mkdir => 0
    NOT_SUPPORTED, // rmdir => 0
    NOT_SUPPORTED, // dopen => 0
    NOT_SUPPORTED, // dclose => 0
    NOT_SUPPORTED, // dread => 0
    NOT_SUPPORTED, // getstat => 0
    NOT_SUPPORTED, // chstat => 0
};
  • iop/fs/subfile/src/subfile.c
static iop_device_ops_t subfile_devops = {
	DUMMY_IMPLEMENTATION, // init => OK
	DUMMY_IMPLEMENTATION, // deinit => OK
	NOT_SUPPORTED, // format => 0
	subfile_op_open, // open => OK
	subfile_op_close, // close => OK
	subfile_op_read, // read => OK
	NOT_SUPPORTED, // write => 0
	subfile_op_lseek, // lseek => OK
	NOT_SUPPORTED, // ioctl => 0
	NOT_SUPPORTED, // remove => 0
	NOT_SUPPORTED, // mkdir => 0
	NOT_SUPPORTED, // rmdir => 0
	NOT_SUPPORTED, // dopen => 0
	NOT_SUPPORTED, // dclose => 0
	NOT_SUPPORTED, // dread => 0
	NOT_SUPPORTED, // getstat => 0
	NOT_SUPPORTED, // chstat => 0
};
  • iop/fs/vfat/src/fs_driver.c
static iop_device_ops_t fs_functarray = {
    &fs_init, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => EOI
    &fs_open, // open => OK
    &fs_close, // close => OK
    &fs_read, // read => OK
    &fs_write, // write => OK
    &fs_lseek, // lseek => OK
    &fs_ioctl, // ioctl => OK
    &fs_remove, // remove => OK
    &fs_mkdir, // mkdir => OK
    &fs_rmdir, // rmdir => OK
    &fs_dopen, // dopen => OK
    &fs_dclose, // dclose => OK
    &fs_dread, // dread => OK
    &fs_getstat, // getstat => OK
    NOT_SUPPORTED, // chstat => EOI
    &fs_rename, // rename => OK
    NOT_SUPPORTED, // chdir => EOI
    NOT_SUPPORTED, // sync => EOI
    NOT_SUPPORTED, // mount => EOI
    NOT_SUPPORTED, // umount => EOI
    NOT_SUPPORTED_S64, // lseek64 => EOI
#ifndef BUILDING_IEEE1394_DISK
    &fs_devctl, // devctl => OK
#else
    NOT_SUPPORTED, // devctl => EOI
#endif /* BUILDING_IEEE1394_DISK */
    NOT_SUPPORTED, // symlink => EOI
    NOT_SUPPORTED, // readlink => EOI
#if !defined(BUILDING_IEEE1394_DISK) && !defined(BUILDING_USBHDFSD)
    &fs_ioctl2, // ioctl2 => OK
#else
    NOT_SUPPORTED, // ioctl2 => EOI
#endif /* BUILDING_IEEE1394_DISK */
};
  • iop/hdd/apa/src/hdd.c
static iomanX_iop_device_ops_t hddOps={
	&hddInit, // init => OK
	&hddDeinit, // deinit => OK
	&hddFormat, // format => OK
	&hddOpen, // open => OK
	&hddClose, // close => OK
	&hddRead, // read => OK
	&hddWrite, // write => OK
	&hddLseek, // lseek => OK
	NOT_SUPPORTED, // ioctl => EPERM
	&hddRemove, // remove => OK
	NOT_SUPPORTED, // mkdir => EPERM
	NOT_SUPPORTED, // rmdir => EPERM
	&hddDopen, // dopen => OK
	&hddClose, // dclose => OK
	&hddDread, // dread => OK
	&hddGetStat, // getstat => OK
	NOT_SUPPORTED, // chstat => EPERM
	&hddReName, // rename => OK
	NOT_SUPPORTED, // chdir => EPERM
	NOT_SUPPORTED, // sync => EPERM
	hddMount, // mount => OK
	hddUmount, // umount => OK
	NOT_SUPPORTED_S64, // lseek64 => EPERM
	&hddDevctl, // devctl => OK
	NOT_SUPPORTED, // symlink => EPERM
	NOT_SUPPORTED, // readlink => EPERM
	&hddIoctl2, // ioctl2 => OK
};
  • iop/hdd/fsck/src/fsck.c
static iomanX_iop_device_ops_t FsckDeviceOps = {
    DUMMY_IMPLEMENTATION, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => 0
    &FsckOpen, // open => OK
    &FsckClose, // close => OK
    NOT_SUPPORTED, // read => 0
    NOT_SUPPORTED, // write => 0
    NOT_SUPPORTED, // lseek => 0
    NOT_SUPPORTED, // ioctl => 0
    NOT_SUPPORTED, // remove => 0
    NOT_SUPPORTED, // mkdir => 0
    NOT_SUPPORTED, // rmdir => 0
    NOT_SUPPORTED, // dopen => 0
    NOT_SUPPORTED, // dclose => 0
    NOT_SUPPORTED, // dread => 0
    NOT_SUPPORTED, // getstat => 0
    NOT_SUPPORTED, // chstat => 0
    NOT_SUPPORTED, // rename => 0
    NOT_SUPPORTED, // chdir => 0
    NOT_SUPPORTED, // sync => 0
    NOT_SUPPORTED, // mount => 0
    NOT_SUPPORTED, // umount => 0
    NOT_SUPPORTED_S64, // lseek64 => 0
    NOT_SUPPORTED, // devctl => 0
    NOT_SUPPORTED, // symlink => 0
    NOT_SUPPORTED, // readlink => 0
    &FsckIoctl2, // ioctl2 => OK
};
  • iop/hdd/fssk/src/fssk.c
static iomanX_iop_device_ops_t FsskDeviceOps = {
    DUMMY_IMPLEMENTATION, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => 0
    &FsskOpen, // open => OK
    &FsskClose, // close => OK
    NOT_SUPPORTED, // read => 0
    NOT_SUPPORTED, // write => 0
    NOT_SUPPORTED, // lseek => 0
    NOT_SUPPORTED, // ioctl => 0
    NOT_SUPPORTED, // remove => 0
    NOT_SUPPORTED, // mkdir => 0
    NOT_SUPPORTED, // rmdir => 0
    NOT_SUPPORTED, // dopen => 0
    NOT_SUPPORTED, // dclose => 0
    NOT_SUPPORTED, // dread => 0
    NOT_SUPPORTED, // getstat => 0
    NOT_SUPPORTED, // chstat => 0
    NOT_SUPPORTED, // rename => 0
    NOT_SUPPORTED, // chdir => 0
    NOT_SUPPORTED, // sync => 0
    NOT_SUPPORTED, // mount => 0
    NOT_SUPPORTED, // umount => 0
    NOT_SUPPORTED_S64, // lseek64 => 0
    NOT_SUPPORTED, // devctl => 0
    NOT_SUPPORTED, // symlink => 0
    NOT_SUPPORTED, // readlink => 0
    &FsskIoctl2, // ioctl2 => OK
};
  • iop/hdd/hdck/src/hdck.c
static iomanX_iop_device_ops_t HdckDeviceOps = {
    &HdckInit, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => OK
    NOT_SUPPORTED, // format => EPERM
    NOT_SUPPORTED, // open => EPERM
    NOT_SUPPORTED, // close => EPERM
    NOT_SUPPORTED, // read => EPERM
    NOT_SUPPORTED, // write => EPERM
    NOT_SUPPORTED, // lseek => EPERM
    NOT_SUPPORTED, // ioctl => EPERM
    NOT_SUPPORTED, // remove => EPERM
    NOT_SUPPORTED, // mkdir => EPERM
    NOT_SUPPORTED, // rmdir => EPERM
    NOT_SUPPORTED, // dopen => EPERM
    NOT_SUPPORTED, // dclose => EPERM
    NOT_SUPPORTED, // dread => EPERM
    NOT_SUPPORTED, // getstat => EPERM
    NOT_SUPPORTED, // chstat => EPERM
    NOT_SUPPORTED, // rename => EPERM
    NOT_SUPPORTED, // chdir => EPERM
    NOT_SUPPORTED, // sync => EPERM
    NOT_SUPPORTED, // mount => EPERM
    NOT_SUPPORTED, // umount => EPERM
    NOT_SUPPORTED_S64, // lseek64 => EPERM
    &HdckDevctl, // devctl => OK
    NOT_SUPPORTED, // symlink => EPERM
    NOT_SUPPORTED, // readlink => EPERM
    NOT_SUPPORTED, // ioctl2 => EPERM
};
  • iop/hdd/hdsk/src/hdsk.c
static iomanX_iop_device_ops_t HdskDeviceOps = {
    &HdskInit, // init => OK
    DUMMY_IMPLEMENTATION, // deinit => EPERM
    NOT_SUPPORTED, // format => EPERM
    NOT_SUPPORTED, // open => EPERM
    NOT_SUPPORTED, // close => EPERM
    NOT_SUPPORTED, // read => EPERM
    NOT_SUPPORTED, // write => EPERM
    NOT_SUPPORTED, // lseek => EPERM
    NOT_SUPPORTED, // ioctl => EPERM
    NOT_SUPPORTED, // remove => EPERM
    NOT_SUPPORTED, // mkdir => EPERM
    NOT_SUPPORTED, // rmdir => EPERM
    NOT_SUPPORTED, // dopen => EPERM
    NOT_SUPPORTED, // dclose => EPERM
    NOT_SUPPORTED, // dread => EPERM
    NOT_SUPPORTED, // getstat => EPERM
    NOT_SUPPORTED, // chstat => EPERM
    NOT_SUPPORTED, // rename => EPERM
    NOT_SUPPORTED, // chdir => EPERM
    NOT_SUPPORTED, // sync => EPERM
    NOT_SUPPORTED, // mount => EPERM
    NOT_SUPPORTED, // umount => EPERM
    NOT_SUPPORTED_S64, // lseek64 => EPERM
    &HdskDevctl, // devctl => OK
    NOT_SUPPORTED, // symlink => EPERM
    NOT_SUPPORTED, // readlink => EPERM
    NOT_SUPPORTED, // ioctl2 => EPERM
};
  • iop/hdd/pfs/src/pfs.c
static iomanX_iop_device_ops_t pfsOps = {
	&pfsFioInit, // init => OK
	&pfsFioDeinit, // deinit => OK
	&pfsFioFormat, // format => OK
	&pfsFioOpen, // open => OK
	&pfsFioClose, // close => OK
	&pfsFioRead, // read => OK
	&pfsFioWrite, // write => OK
	&pfsFioLseek, // lseek => OK
	&pfsFioIoctl, // ioctl => OK
	&pfsFioRemove, // remove => OK
	&pfsFioMkdir, // mkdir => OK
	&pfsFioRmdir, // rmdir => OK
	&pfsFioDopen, // dopen => OK
	&pfsFioClose, // dclose => OK
	&pfsFioDread, // dread => OK
	&pfsFioGetstat, // getstat => OK
	&pfsFioChstat, // chstat => OK
	&pfsFioRename, // rename => OK
	&pfsFioChdir, // chdir => OK
	&pfsFioSync, // sync => OK
	&pfsFioMount, // mount => OK
	&pfsFioUmount, // umount => OK
	&pfsFioLseek64, // lseek64 => OK
	&pfsFioDevctl, // devctl => OK
	&pfsFioSymlink, // symlink => OK
	&pfsFioReadlink, // readlink => OK
	&pfsFioIoctl2, // ioctl2 => OK
};
  • iop/network/smbman/src/smb_fio.c
static iop_device_ops_t smbman_ops = {
    &smb_init, // init => OK
    &smb_deinit, // deinit => OK
    NOT_SUPPORTED, // format => EOI
    &smb_open, // open => OK
    &smb_close, // close => OK
    &smb_read, // read => OK
    &smb_write, // write => OK
    &smb_lseek, // lseek => OK
    NOT_SUPPORTED, // ioctl => EOI
    &smb_remove, // remove => OK
    &smb_mkdir, // mkdir => OK
    &smb_rmdir, // rmdir => OK
    &smb_dopen, // dopen => OK
    &smb_dclose, // dclose => OK
    &smb_dread, // dread => OK
    &smb_getstat, // getstat => OK
    NOT_SUPPORTED, // chstat => EOI
    &smb_rename, // rename => OK
    &smb_chdir, // chdir => OK
    NOT_SUPPORTED, // sync => EOI
    NOT_SUPPORTED, // mount => EOI
    NOT_SUPPORTED, // umount => EOI
    &smb_lseek64, // lseek64 => OK
    &smb_devctl, // devctl => OK
    NOT_SUPPORTED, // symlink => EOI
    NOT_SUPPORTED, // readlink => EOI
    NOT_SUPPORTED, // ioctl2 => EOI
};
  • iop/network/udptty/src/udptty.c
static iop_device_ops_t tty_ops = {
    tty_init, // init => OK
    tty_deinit, // deinit => OK
    NOT_SUPPORTED, // format => EOI
    (void *)tty_stdout_fd, // open => OK
    (void *)tty_stdout_fd, // close => OK
    NOT_SUPPORTED, // read => EOI
    (void *)tty_write, // write => OK
    NOT_SUPPORTED, // lseek => EOI
    NOT_SUPPORTED, // ioctl => EOI
    NOT_SUPPORTED, // remove => EOI
    NOT_SUPPORTED, // mkdir => EOI
    NOT_SUPPORTED, // rmdir => EOI
    NOT_SUPPORTED, // dopen => EOI
    NOT_SUPPORTED, // dclose => EOI
    NOT_SUPPORTED, // dread => EOI
    NOT_SUPPORTED, // getstat => EOI
    NOT_SUPPORTED, // chstat => EOI
};
  • iop/system/ioman/src/ioman.c
iop_io_device_ops_t tty_dev_operations = {
	DUMMY_IMPLEMENTATION, // init => OK
	DUMMY_IMPLEMENTATION, // deinit => OK
	NOT_SUPPORTED, // format => 0
	NOT_SUPPORTED, // open => 0
	NOT_SUPPORTED, // close => 0
	NOT_SUPPORTED, // read => 0
	NOT_SUPPORTED, // write => 0
	NOT_SUPPORTED, // lseek => 0
	NOT_SUPPORTED, // ioctl => 0
	NOT_SUPPORTED, // remove => 0
	NOT_SUPPORTED, // mkdir => 0
	NOT_SUPPORTED, // rmdir => 0
	NOT_SUPPORTED, // dopen => 0
	NOT_SUPPORTED, // dclose => 0
	NOT_SUPPORTED, // dread => 0
	NOT_SUPPORTED, // getstat => 0
	NOT_SUPPORTED, // chstat => 0
};
  • iop/system/iomanx/src/iomanX.c
static iomanX_iop_device_ops_t dev_tty_dev_operations = {
	DUMMY_IMPLEMENTATION, // init => OK
	DUMMY_IMPLEMENTATION, // deinit => OK
	NOT_SUPPORTED, // format => 0
	NOT_SUPPORTED, // open => 0
	NOT_SUPPORTED, // close => 0
	NOT_SUPPORTED, // read => 0
	NOT_SUPPORTED, // write => 0
	NOT_SUPPORTED, // lseek => 0
	NOT_SUPPORTED, // ioctl => 0
	NOT_SUPPORTED, // remove => 0
	NOT_SUPPORTED, // mkdir => 0
	NOT_SUPPORTED, // rmdir => 0
	NOT_SUPPORTED, // dopen => 0
	NOT_SUPPORTED, // dclose => 0
	NOT_SUPPORTED, // dread => 0
	NOT_SUPPORTED, // getstat => 0
	NOT_SUPPORTED, // chstat => 0
	NOT_SUPPORTED, // rename => 0
	NOT_SUPPORTED, // chdir => 0
	NOT_SUPPORTED, // sync => 0
	NOT_SUPPORTED, // mount => 0
	NOT_SUPPORTED, // umount => 0
	NOT_SUPPORTED_S64, // lseek64 => 0
	NOT_SUPPORTED, // devctl => 0
	NOT_SUPPORTED, // symlink => 0
	NOT_SUPPORTED, // readlink => 0
	NOT_SUPPORTED, // ioctl2 => 0
};
  • iop/usb/keyboard/src/ps2kbd.c
static iop_device_ops_t fio_ops =
  {
  &fio_init, // init => OK
  DUMMY_IMPLEMENTATION, // deinit => EOI
  &fio_format, // format => OK
  &fio_open, // open => OK
  &fio_close, // close => OK
  &fio_read, // read => OK
  NOT_SUPPORTED, // write => EOI
  NOT_SUPPORTED, // lseek => EOI
  &fio_ioctl, // ioctl => OK
  NOT_SUPPORTED, // remove => EOI
  NOT_SUPPORTED, // mkdir => EOI
  NOT_SUPPORTED, // rmdir => EOI
  NOT_SUPPORTED, // dopen => EOI
  NOT_SUPPORTED, // dclose => EOI
  NOT_SUPPORTED, // dread => EOI
  NOT_SUPPORTED, // getstat => EOI
  NOT_SUPPORTED, // chstat => EOI
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant