Skip to content

Commit 398c0e6

Browse files
committed
Revert "Merge pull request ps2dev#678 from uyjulian/whole_revert_625"
This reverts commit 400d8fc, reversing changes made to ed5ead7.
1 parent 8973a61 commit 398c0e6

File tree

23 files changed

+317
-419
lines changed

23 files changed

+317
-419
lines changed

iop/arcade/accdvd/src/cddrv.c

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,27 @@ static int cddrv_read(iop_file_t *io, void *buf, int cnt);
1818
static int cddrv_write(iop_file_t *io, void *buf, int cnt);
1919
static int cddrv_lseek(iop_file_t *io, int offset, int whence);
2020
static int cddrv_ioctl(iop_file_t *io, int cmd, void *arg);
21-
static int cddrv_dummy();
2221

22+
2323
static iop_device_ops_t Cddrv_ops = {
2424
&cddrv_adddrv,
2525
&cddrv_deldrv,
26-
&cddrv_dummy,
26+
NOT_SUPPORTED,
2727
&cddrv_open,
2828
&cddrv_close,
2929
&cddrv_read,
3030
&cddrv_write,
3131
&cddrv_lseek,
3232
&cddrv_ioctl,
33-
&cddrv_dummy,
34-
&cddrv_dummy,
35-
&cddrv_dummy,
36-
&cddrv_dummy,
37-
&cddrv_dummy,
38-
&cddrv_dummy,
39-
&cddrv_dummy,
40-
&cddrv_dummy};
33+
NOT_SUPPORTED,
34+
NOT_SUPPORTED,
35+
NOT_SUPPORTED,
36+
NOT_SUPPORTED,
37+
NOT_SUPPORTED,
38+
NOT_SUPPORTED,
39+
NOT_SUPPORTED,
40+
NOT_SUPPORTED
41+
};
4142

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

@@ -158,11 +159,6 @@ static int cddrv_ioctl(iop_file_t *io, int cmd, void *arg)
158159
return -EINVAL;
159160
}
160161

161-
static int cddrv_dummy()
162-
{
163-
return -EINVAL;
164-
}
165-
166162
int cddrv_module_start(int argc, char **argv)
167163
{
168164
int v2;

iop/cdvd/cdfs/src/main.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -418,29 +418,24 @@ static int fio_getstat(iop_file_t *fd, const char *name, io_stat_t *stat)
418418
return ret;
419419
}
420420

421-
static int cdfs_dummy() {
422-
DPRINTF("CDFS: dummy function called\n\n");
423-
return -EIO;
424-
}
425-
426421
static iop_device_ops_t fio_ops = {
427422
&fio_init,
428423
&fio_deinit,
429-
(void *)&cdfs_dummy,
424+
NOT_SUPPORTED,
430425
&fio_open,
431426
&fio_close,
432427
&fio_read,
433428
&fio_write,
434429
&fio_lseek,
435-
(void *)&cdfs_dummy,
436-
(void *)&cdfs_dummy,
437-
(void *)&cdfs_dummy,
438-
(void *)&cdfs_dummy,
430+
NOT_SUPPORTED,
431+
NOT_SUPPORTED,
432+
NOT_SUPPORTED,
433+
NOT_SUPPORTED,
439434
&fio_openDir,
440435
&fio_closeDir,
441436
&fio_dread,
442437
&fio_getstat,
443-
(void *)&cdfs_dummy,
438+
NOT_SUPPORTED,
444439
};
445440

446441
static iop_device_t fio_driver = {

iop/cdvd/xesdrv/src/xesdrv.c

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static int esdrv_df_devctl(
2828
iomanX_iop_file_t *f, const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
2929
static int
3030
esdrv_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
31-
static int esdrv_df_null();
3231
static s64 esdrv_df_null_long();
3332
static int
3433
esioctl2_func_1(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
@@ -223,30 +222,30 @@ struct DevctlCmdTbl_t
223222
static iomanX_iop_device_ops_t DvrFuncTbl = {
224223
&esdrv_df_init,
225224
&esdrv_df_exit,
226-
(void *)&esdrv_df_null,
227-
(void *)&esdrv_df_null,
228-
(void *)&esdrv_df_null,
229-
(void *)&esdrv_df_null,
230-
(void *)&esdrv_df_null,
231-
(void *)&esdrv_df_null,
225+
NOT_SUPPORTED,
226+
NOT_SUPPORTED,
227+
NOT_SUPPORTED,
228+
NOT_SUPPORTED,
229+
NOT_SUPPORTED,
230+
NOT_SUPPORTED,
232231
&esdrv_df_ioctl,
233-
(void *)&esdrv_df_null,
234-
(void *)&esdrv_df_null,
235-
(void *)&esdrv_df_null,
236-
(void *)&esdrv_df_null,
237-
(void *)&esdrv_df_null,
238-
(void *)&esdrv_df_null,
239-
(void *)&esdrv_df_null,
240-
(void *)&esdrv_df_null,
241-
(void *)&esdrv_df_null,
242-
(void *)&esdrv_df_null,
243-
(void *)&esdrv_df_null,
244-
(void *)&esdrv_df_null,
245-
(void *)&esdrv_df_null,
232+
NOT_SUPPORTED,
233+
NOT_SUPPORTED,
234+
NOT_SUPPORTED,
235+
NOT_SUPPORTED,
236+
NOT_SUPPORTED,
237+
NOT_SUPPORTED,
238+
NOT_SUPPORTED,
239+
NOT_SUPPORTED,
240+
NOT_SUPPORTED,
241+
NOT_SUPPORTED,
242+
NOT_SUPPORTED,
243+
NOT_SUPPORTED,
244+
NOT_SUPPORTED,
246245
(void *)&esdrv_df_null_long,
247246
&esdrv_df_devctl,
248-
(void *)&esdrv_df_null,
249-
(void *)&esdrv_df_null,
247+
NOT_SUPPORTED,
248+
NOT_SUPPORTED,
250249
&esdrv_df_ioctl2,
251250
};
252251
static iomanX_iop_device_t ESDRV = {
@@ -372,11 +371,6 @@ esdrv_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, v
372371
return -EINVAL;
373372
}
374373

375-
static int esdrv_df_null()
376-
{
377-
return -EUNSUP;
378-
}
379-
380374
static s64 esdrv_df_null_long()
381375
{
382376
return -EUNSUP;

iop/debug/iop_sbusdbg/src/sbus_tty.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Of course this requires that the EE-side code accept this command and output the
2727

2828
extern void sbus_tty_puts(const char *str);
2929

30-
static int ttyfs_error() { return -EPERM; }
31-
3230
static int ttyfs_init()
3331
{
3432
//DBG_puts("SIOTTY: FS Init()\n");
@@ -98,21 +96,21 @@ static iop_device_ops_t fsd_ops =
9896
{
9997
&ttyfs_init,
10098
&ttyfs_deinit,
101-
(void *)&ttyfs_error,
99+
NOT_SUPPORTED,
102100
&ttyfs_open,
103101
&ttyfs_close,
104-
(void *)&ttyfs_error,
102+
NOT_SUPPORTED,
105103
&ttyfs_write,
106-
(void *)&ttyfs_error,
107-
(void *)&ttyfs_error,
108-
(void *)&ttyfs_error,
109-
(void *)&ttyfs_error,
110-
(void *)&ttyfs_error,
104+
NOT_SUPPORTED,
105+
NOT_SUPPORTED,
106+
NOT_SUPPORTED,
107+
NOT_SUPPORTED,
108+
NOT_SUPPORTED,
111109
&ttyfs_dopen,
112110
&ttyfs_close,
113-
(void *)&ttyfs_error,
114-
(void *)&ttyfs_error,
115-
(void *)&ttyfs_error,
111+
NOT_SUPPORTED,
112+
NOT_SUPPORTED,
113+
NOT_SUPPORTED,
116114
};
117115

118116
static iop_device_t tty_fsd =

iop/debug/ppctty/src/tty.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ static int tty_sema = -1;
2626

2727
extern void tty_puts(const char *str);
2828

29-
static int ttyfs_error() { return -EPERM; }
30-
3129
static int ttyfs_init()
3230
{
3331
DPRINTF("FS Init()\n");
@@ -105,21 +103,21 @@ static iop_device_ops_t fsd_ops =
105103
{
106104
&ttyfs_init,
107105
&ttyfs_deinit,
108-
(void *)&ttyfs_error,
106+
NOT_SUPPORTED,
109107
&ttyfs_open,
110108
&ttyfs_close,
111-
(void *)&ttyfs_error,
109+
NOT_SUPPORTED,
112110
&ttyfs_write,
113-
(void *)&ttyfs_error,
114-
(void *)&ttyfs_error,
115-
(void *)&ttyfs_error,
116-
(void *)&ttyfs_error,
117-
(void *)&ttyfs_error,
111+
NOT_SUPPORTED,
112+
NOT_SUPPORTED,
113+
NOT_SUPPORTED,
114+
NOT_SUPPORTED,
115+
NOT_SUPPORTED,
118116
&ttyfs_dopen,
119117
&ttyfs_close,
120-
(void *)&ttyfs_error,
121-
(void *)&ttyfs_error,
122-
(void *)&ttyfs_error,
118+
NOT_SUPPORTED,
119+
NOT_SUPPORTED,
120+
NOT_SUPPORTED,
123121
};
124122

125123
static iop_device_t tty_fsd =

iop/dvrp/dvr/src/dvr.c

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ extern int dvr_df_exit(iomanX_iop_device_t *dev);
3333
extern int dvr_df_ioctl(iomanX_iop_file_t *f, int cmd, void *param);
3434
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);
3535
extern int dvr_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
36-
extern int dvr_df_null();
3736
extern s64 dvr_df_null_long();
3837
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);
3938
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);
@@ -114,30 +113,30 @@ static iomanX_iop_device_ops_t DvrFuncTbl =
114113
{
115114
&dvr_df_init,
116115
&dvr_df_exit,
117-
(void *)&dvr_df_null,
118-
(void *)&dvr_df_null,
119-
(void *)&dvr_df_null,
120-
(void *)&dvr_df_null,
121-
(void *)&dvr_df_null,
122-
(void *)&dvr_df_null,
116+
NOT_SUPPORTED,
117+
NOT_SUPPORTED,
118+
NOT_SUPPORTED,
119+
NOT_SUPPORTED,
120+
NOT_SUPPORTED,
121+
NOT_SUPPORTED,
123122
&dvr_df_ioctl,
124-
(void *)&dvr_df_null,
125-
(void *)&dvr_df_null,
126-
(void *)&dvr_df_null,
127-
(void *)&dvr_df_null,
128-
(void *)&dvr_df_null,
129-
(void *)&dvr_df_null,
130-
(void *)&dvr_df_null,
131-
(void *)&dvr_df_null,
132-
(void *)&dvr_df_null,
133-
(void *)&dvr_df_null,
134-
(void *)&dvr_df_null,
135-
(void *)&dvr_df_null,
136-
(void *)&dvr_df_null,
123+
NOT_SUPPORTED,
124+
NOT_SUPPORTED,
125+
NOT_SUPPORTED,
126+
NOT_SUPPORTED,
127+
NOT_SUPPORTED,
128+
NOT_SUPPORTED,
129+
NOT_SUPPORTED,
130+
NOT_SUPPORTED,
131+
NOT_SUPPORTED,
132+
NOT_SUPPORTED,
133+
NOT_SUPPORTED,
134+
NOT_SUPPORTED,
135+
NOT_SUPPORTED,
137136
(void *)&dvr_df_null_long,
138137
&dvr_df_devctl,
139-
(void *)&dvr_df_null,
140-
(void *)&dvr_df_null,
138+
NOT_SUPPORTED,
139+
NOT_SUPPORTED,
141140
&dvr_df_ioctl2,
142141
};
143142
char TEVENT_BUF[6144];
@@ -286,14 +285,9 @@ int dvr_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen,
286285
return -EINVAL;
287286
}
288287

289-
int dvr_df_null()
290-
{
291-
return -EUNSUP;
292-
}
293-
294288
s64 dvr_df_null_long()
295289
{
296-
return -EUNSUP;
290+
return -134LL;
297291
}
298292

299293
int dvrioctl2_rec_start(

iop/dvrp/dvrav/src/dvrav.c

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ extern int dvrav_df_exit(iomanX_iop_device_t *dev);
3232
extern int dvrav_df_ioctl(iomanX_iop_file_t *f, int cmd, void *param);
3333
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);
3434
extern int dvrav_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
35-
extern int dvrav_df_null();
3635
extern s64 dvrav_df_null_long();
3736
extern int avioctl2_select_position(iomanX_iop_file_t *a1, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
3837
extern int avioctl2_get_position(iomanX_iop_file_t *a1, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
@@ -113,30 +112,30 @@ static iomanX_iop_device_ops_t DvrFuncTbl =
113112
{
114113
&dvrav_df_init,
115114
&dvrav_df_exit,
116-
(void *)&dvrav_df_null,
117-
(void *)&dvrav_df_null,
118-
(void *)&dvrav_df_null,
119-
(void *)&dvrav_df_null,
120-
(void *)&dvrav_df_null,
121-
(void *)&dvrav_df_null,
115+
NOT_SUPPORTED,
116+
NOT_SUPPORTED,
117+
NOT_SUPPORTED,
118+
NOT_SUPPORTED,
119+
NOT_SUPPORTED,
120+
NOT_SUPPORTED,
122121
&dvrav_df_ioctl,
123-
(void *)&dvrav_df_null,
124-
(void *)&dvrav_df_null,
125-
(void *)&dvrav_df_null,
126-
(void *)&dvrav_df_null,
127-
(void *)&dvrav_df_null,
128-
(void *)&dvrav_df_null,
129-
(void *)&dvrav_df_null,
130-
(void *)&dvrav_df_null,
131-
(void *)&dvrav_df_null,
132-
(void *)&dvrav_df_null,
133-
(void *)&dvrav_df_null,
134-
(void *)&dvrav_df_null,
135-
(void *)&dvrav_df_null,
122+
NOT_SUPPORTED,
123+
NOT_SUPPORTED,
124+
NOT_SUPPORTED,
125+
NOT_SUPPORTED,
126+
NOT_SUPPORTED,
127+
NOT_SUPPORTED,
128+
NOT_SUPPORTED,
129+
NOT_SUPPORTED,
130+
NOT_SUPPORTED,
131+
NOT_SUPPORTED,
132+
NOT_SUPPORTED,
133+
NOT_SUPPORTED,
134+
NOT_SUPPORTED,
136135
(void *)&dvrav_df_null_long,
137136
&dvrav_df_devctl,
138-
(void *)&dvrav_df_null,
139-
(void *)&dvrav_df_null,
137+
NOT_SUPPORTED,
138+
NOT_SUPPORTED,
140139
&dvrav_df_ioctl2,
141140
};
142141
static iomanX_iop_device_t DVRAV = {
@@ -284,14 +283,9 @@ int dvrav_df_ioctl2(iomanX_iop_file_t *f, int cmd, void *arg, unsigned int argle
284283
return -EINVAL;
285284
}
286285

287-
int dvrav_df_null()
288-
{
289-
return -EUNSUP;
290-
}
291-
292286
s64 dvrav_df_null_long()
293287
{
294-
return -EUNSUP;
288+
return -134LL;
295289
}
296290

297291
int avioctl2_get_tun_offset(

0 commit comments

Comments
 (0)