Skip to content

Commit

Permalink
Merge pull request ps2dev#678 from uyjulian/whole_revert_625
Browse files Browse the repository at this point in the history
[NFC] Revert ps2dev#625
  • Loading branch information
uyjulian authored Nov 14, 2024
2 parents ed5ead7 + 37d6c12 commit 400d8fc
Show file tree
Hide file tree
Showing 23 changed files with 419 additions and 317 deletions.
26 changes: 15 additions & 11 deletions iop/arcade/accdvd/src/cddrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,26 @@ static int cddrv_read(iop_file_t *io, void *buf, int cnt);
static int cddrv_write(iop_file_t *io, void *buf, int cnt);
static int cddrv_lseek(iop_file_t *io, int offset, int whence);
static int cddrv_ioctl(iop_file_t *io, int cmd, void *arg);
static int cddrv_dummy();


static iop_device_ops_t Cddrv_ops = {
&cddrv_adddrv,
&cddrv_deldrv,
NOT_SUPPORTED,
&cddrv_dummy,
&cddrv_open,
&cddrv_close,
&cddrv_read,
&cddrv_write,
&cddrv_lseek,
&cddrv_ioctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED
};
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy,
&cddrv_dummy};

static iop_device_t Cddrv = {"cdrom", 16u, 0u, "ATAPI_C/DVD-ROM", &Cddrv_ops};

Expand Down Expand Up @@ -159,6 +158,11 @@ static int cddrv_ioctl(iop_file_t *io, int cmd, void *arg)
return -EINVAL;
}

static int cddrv_dummy()
{
return -EINVAL;
}

int cddrv_module_start(int argc, char **argv)
{
int v2;
Expand Down
17 changes: 11 additions & 6 deletions iop/cdvd/cdfs/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,24 +418,29 @@ static int fio_getstat(iop_file_t *fd, const char *name, io_stat_t *stat)
return ret;
}

static int cdfs_dummy() {
DPRINTF("CDFS: dummy function called\n\n");
return -EIO;
}

static iop_device_ops_t fio_ops = {
&fio_init,
&fio_deinit,
NOT_SUPPORTED,
(void *)&cdfs_dummy,
&fio_open,
&fio_close,
&fio_read,
&fio_write,
&fio_lseek,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&cdfs_dummy,
(void *)&cdfs_dummy,
(void *)&cdfs_dummy,
(void *)&cdfs_dummy,
&fio_openDir,
&fio_closeDir,
&fio_dread,
&fio_getstat,
NOT_SUPPORTED,
(void *)&cdfs_dummy,
};

static iop_device_t fio_driver = {
Expand Down
48 changes: 27 additions & 21 deletions iop/cdvd/xesdrv/src/xesdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static int esdrv_df_devctl(
iomanX_iop_file_t *f, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
static int
esdrv_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
static int esdrv_df_null();
static s64 esdrv_df_null_long();
static int
esioctl2_func_1(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
Expand Down Expand Up @@ -222,30 +223,30 @@ struct DevctlCmdTbl_t
static iomanX_iop_device_ops_t DvrFuncTbl = {
&esdrv_df_init,
&esdrv_df_exit,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
&esdrv_df_ioctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null_long,
&esdrv_df_devctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&esdrv_df_null,
(void *)&esdrv_df_null,
&esdrv_df_ioctl2,
};
static iomanX_iop_device_t ESDRV = {
Expand Down Expand Up @@ -371,6 +372,11 @@ esdrv_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, v
return -EINVAL;
}

static int esdrv_df_null()
{
return -EUNSUP;
}

static s64 esdrv_df_null_long()
{
return -EUNSUP;
Expand Down
22 changes: 12 additions & 10 deletions iop/debug/iop_sbusdbg/src/sbus_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Of course this requires that the EE-side code accept this command and output the

extern void sbus_tty_puts(const char *str);

static int ttyfs_error() { return -EPERM; }

static int ttyfs_init()
{
//DBG_puts("SIOTTY: FS Init()\n");
Expand Down Expand Up @@ -96,21 +98,21 @@ static iop_device_ops_t fsd_ops =
{
&ttyfs_init,
&ttyfs_deinit,
NOT_SUPPORTED,
(void *)&ttyfs_error,
&ttyfs_open,
&ttyfs_close,
NOT_SUPPORTED,
(void *)&ttyfs_error,
&ttyfs_write,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
&ttyfs_dopen,
&ttyfs_close,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
};

static iop_device_t tty_fsd =
Expand Down
22 changes: 12 additions & 10 deletions iop/debug/ppctty/src/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ static int tty_sema = -1;

extern void tty_puts(const char *str);

static int ttyfs_error() { return -EPERM; }

static int ttyfs_init()
{
DPRINTF("FS Init()\n");
Expand Down Expand Up @@ -103,21 +105,21 @@ static iop_device_ops_t fsd_ops =
{
&ttyfs_init,
&ttyfs_deinit,
NOT_SUPPORTED,
(void *)&ttyfs_error,
&ttyfs_open,
&ttyfs_close,
NOT_SUPPORTED,
(void *)&ttyfs_error,
&ttyfs_write,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
&ttyfs_dopen,
&ttyfs_close,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
(void *)&ttyfs_error,
};

static iop_device_t tty_fsd =
Expand Down
50 changes: 28 additions & 22 deletions iop/dvrp/dvr/src/dvr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ extern int dvr_df_exit(iomanX_iop_device_t *dev);
extern int dvr_df_ioctl(iomanX_iop_file_t *f, int cmd, void *param);
extern int dvr_df_devctl(iomanX_iop_file_t *a1, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int dvr_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int dvr_df_null();
extern s64 dvr_df_null_long();
extern int dvrioctl2_rec_start(iomanX_iop_file_t *a1, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int dvrioctl2_rec_pause(iomanX_iop_file_t *a1, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
Expand Down Expand Up @@ -113,30 +114,30 @@ static iomanX_iop_device_ops_t DvrFuncTbl =
{
&dvr_df_init,
&dvr_df_exit,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
&dvr_df_ioctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
(void *)&dvr_df_null_long,
&dvr_df_devctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvr_df_null,
(void *)&dvr_df_null,
&dvr_df_ioctl2,
};
char TEVENT_BUF[6144];
Expand Down Expand Up @@ -285,9 +286,14 @@ int dvr_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen,
return -EINVAL;
}

int dvr_df_null()
{
return -EUNSUP;
}

s64 dvr_df_null_long()
{
return -134LL;
return -EUNSUP;
}

int dvrioctl2_rec_start(
Expand Down
50 changes: 28 additions & 22 deletions iop/dvrp/dvrav/src/dvrav.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ extern int dvrav_df_exit(iomanX_iop_device_t *dev);
extern int dvrav_df_ioctl(iomanX_iop_file_t *f, int cmd, void *param);
extern int dvrav_df_devctl(iomanX_iop_file_t *a1, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int dvrav_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int dvrav_df_null();
extern s64 dvrav_df_null_long();
extern int avioctl2_select_position(iomanX_iop_file_t *a1, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
extern int avioctl2_get_position(iomanX_iop_file_t *a1, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
Expand Down Expand Up @@ -112,30 +113,30 @@ static iomanX_iop_device_ops_t DvrFuncTbl =
{
&dvrav_df_init,
&dvrav_df_exit,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
&dvrav_df_ioctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null_long,
&dvrav_df_devctl,
NOT_SUPPORTED,
NOT_SUPPORTED,
(void *)&dvrav_df_null,
(void *)&dvrav_df_null,
&dvrav_df_ioctl2,
};
static iomanX_iop_device_t DVRAV = {
Expand Down Expand Up @@ -283,9 +284,14 @@ int dvrav_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int argle
return -EINVAL;
}

int dvrav_df_null()
{
return -EUNSUP;
}

s64 dvrav_df_null_long()
{
return -134LL;
return -EUNSUP;
}

int avioctl2_get_tun_offset(
Expand Down
Loading

0 comments on commit 400d8fc

Please sign in to comment.