* don't display a share connection error when listing share
[open-ps2-loader.git] / src / debug.c
blob352206413c4fd95fa54bd5aff1cf52af65acee58
1 /*
2 Copyright 2010, jimmikaelakel
3 Licenced under Academic Free License version 3.0
4 Review OpenUsbLd README & LICENSE files for further details.
5 */
7 #include "include/usbld.h"
8 #include "include/system.h"
9 #include "include/ioman.h"
11 extern void *ps2dev9_irx;
12 extern int size_ps2dev9_irx;
14 extern void *smstcpip_irx;
15 extern int size_smstcpip_irx;
17 extern void *ingame_smstcpip_irx;
18 extern int size_ingame_smstcpip_irx;
20 extern void *smsmap_irx;
21 extern int size_smsmap_irx;
23 extern void *udptty_irx;
24 extern int size_udptty_irx;
26 extern void *ioptrap_irx;
27 extern int size_ioptrap_irx;
29 extern void *ps2link_irx;
30 extern int size_ps2link_irx;
32 extern void *smsutils_irx;
33 extern int size_smsutils_irx;
36 int debugSetActive(void) {
37 int ret, ipconfiglen;
38 char ipconfig[IPCONFIG_MAX_LEN] __attribute__((aligned(64)));
40 ipconfiglen = sysSetIPConfig(ipconfig);
42 ret = sysLoadModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL);
43 if (ret < 0)
44 return -1;
46 ret = sysLoadModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL);
47 if (ret < 0)
48 return -2;
50 ret = sysLoadModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL);
51 if (ret < 0)
52 return -3;
54 ret = sysLoadModuleBuffer(&smsmap_irx, size_smsmap_irx, ipconfiglen, ipconfig);
55 if (ret < 0)
56 return -4;
58 ret = sysLoadModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL);
59 if (ret < 0)
60 return -5;
62 ret = sysLoadModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL);
63 if (ret < 0)
64 return -6;
66 ret = sysLoadModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL);
67 if (ret < 0)
68 return -7;
70 return 0;