Commit Graph

127 Commits

Author SHA1 Message Date
GaryOderNichts
7d9fa9e416 Add IRC library 2022-12-06 12:52:04 +01:00
Maschell
96d410c827 libwhb: Fix length check in ConsoleAddLine 2022-10-13 00:04:23 +02:00
GaryOderNichts
575b8897e7 wutstdc++: Fix __wut_cond_timedwait 2022-09-27 23:24:27 +02:00
Maschell
d106a44cf5 wutstdc++: Add weak variable __wut_thread_default_stack_size to override the default stack size 2022-09-21 21:01:43 +02:00
Maschell
aa2e76795f wutstdc++: Decrease the stack size for gthread threads from 4MiB to 128KiB. 2022-09-21 21:01:43 +02:00
Maschell
ec4a7eae1e wutdevoptab: check size of a read/write before checking the buffer alignment to reduce the read/write calls 2022-09-20 19:23:16 +02:00
GaryOderNichts
192a26ffc1 whb/console: Add missing MEMRecordStateForFrmHeap 2022-09-17 22:15:07 +02:00
Maschell
be79908dbd wutstdc++: Fix potential memory leak when thread creation fails. 2022-09-17 21:53:17 +02:00
Maschell
6c1388abd7 wutstdc++: Check if memory allocations were successful on thread creation 2022-09-17 21:46:25 +02:00
Maschell
95feb9288a wutdevoptab: Fix memory leak in open() 2022-08-28 00:15:13 +02:00
GaryOderNichts
366f02606b Add several definitions for Multi/Double DRC mode 2022-08-28 00:14:56 +02:00
Maschell
733d5000fc wutdevoptab: Add support for more open() flags (and flag combinations) 2022-08-06 14:14:11 +02:00
GaryOderNichts
42292fadc6 wutnewlib: Use OSCompareAndSwapAtomicEx for sbrk 2022-08-05 23:31:10 +02:00
GaryOderNichts
e81c3a159f wutstdc++: Use OSSwapAtomic where compare isn't necessary 2022-08-05 23:31:10 +02:00
GaryOderNichts
4b81e19867 wutnewlib: Replace built-in atomics with OS* atomics 2022-08-05 23:31:10 +02:00
Maschell
414843d274 wutdevoptab: Return early in lseek when the position is not changing 2022-08-02 23:44:18 +02:00
Maschell
1c5e6af39b wutdevoptab: Fix "syncing" the file->offset with the real offset on append mode. 2022-08-02 23:08:29 +02:00
Maschell
a902da1ce7 wutdevoptab: Prevent file-offset overflow in seek implementation 2022-07-30 18:06:39 +02:00
Maschell
3469036c44 wutdevoptab: Only call FSGetStatFile to obtain the filesize on SEEK_END 2022-07-30 18:04:36 +02:00
GaryOderNichts
2c299d71fc devoptab: Make sure file->offset gets updated and initialized 2022-07-30 17:58:06 +02:00
Maschell
b86ac2bf98 wutdevoptab: Fix check for O_UNENCRYPTED flag 2022-07-30 17:57:05 +02:00
Maschell
028899ecd3 wutcrt: Add a trapword in case a debugger is initialized to allow debugging 2022-07-27 23:40:43 +02:00
Maschell
215adf35bc wutcrt: Make sure main is called with a 8 byte aligned stack pointer 2022-07-27 23:12:03 +02:00
Crementif
d621766b2f
devoptab: Implement various functions and fixes (#223)
- Improved error codes for unlink and rmdir regarding non-empty directories.
- Return ENOENT on empty strings since it softlocks the Wii U. Since the devoptab relies on the cwd it's pretty easy to run into with stuff like recursive path creation for example.
- Clean up open_r mode_t->string conversion
- Improved FSStat->mode_t conversion
- Add FSOpenFileEx and flags
2022-07-23 12:03:07 +02:00
GaryOderNichts
f1b5da996f
Replace the CafeOS default heap with a custom one (#221) 2022-06-30 21:05:11 +02:00
Maschell
0c4d7685f1 wutdevoptab: Add stub implemenation of utimes and implement lstat via stub to avoid undefined behaviour. 2022-06-18 16:55:34 +02:00
Maschell
8a2bf09800 wutdevoptab: Fix setting mode flags 2022-06-18 12:47:04 +02:00
Maschell
89b396d373 wutdevoptab: Only update the file->offset on a successful seek. 2022-06-18 12:46:45 +02:00
Dave Murphy
6494a30c3d wutdevoptab: Make sure to always read into/write from a properly aligned buffer 2022-06-04 21:35:58 +02:00
Maschell
c0e4eb7ae8 wutdevoptab: simplify the __wut_fs_translate_time implementation 2022-06-04 19:23:30 +02:00
Maschell
f0da3d7236
wutdevoptab: Add time and mode information for stat and fstat (#218)
* wutdevoptab: Add time and mode information for stat and fstat

* wutdevoptab: rename __wut_translate_mode to __wut_fs_translate_mode
2022-05-07 11:26:11 +01:00
Maschell
cd6b4fb45d Fix syscall_clock implementation 2022-04-15 17:02:03 +01:00
Maschell
578674a336 wutdevoptab: Replace FSError usage with FSStatus in __wut_fs_translate_error 2022-04-15 16:59:42 +01:00
fincs
03c3d42d38
wutnewlib: replace dynamic allocation of OSMutex with static table 2022-03-05 17:58:51 +01:00
Maschell
b23f9bde00
libwhb: Use an aligned buffer size for WHBReadWholeFile to avoid potential heap corruption (#212) 2022-03-04 11:52:40 +00:00
Maschell
616ebe1a06 wutdevoptab: Only call FSUnmount if FSMount was successful 2022-02-27 16:06:22 +01:00
Maschell
62b78f7b9f
coreinit: Add missing parameter to FSChangeMode/FSChangeModeAsync (#199) 2022-02-26 16:55:47 +01:00
Maschell
920c8ad3d6
wutdevoptab: Add missing FSUnmount on fini (#207) 2022-02-26 16:54:18 +01:00
Maschell
58fabd79a2 libwhb: Add missing close() call on WHBLogUdpDeinit reset socket val 2022-02-19 17:28:53 +01:00
Maschell
fefde021b9
wutmalloc: Fix memalign to ensure the size is aligned (#196)
This fixes situations that can arise in places such as FSReadFile/FSWriteFile, in which buffer sizes need to be aligned to 0x40; otherwise heap corruptions could happen when multithreading.
2022-02-12 20:49:16 +01:00
James Benton
432c895f75 Add nn::erreula library. 2022-01-20 00:38:36 +01:00
James Benton
e11ded4992 nn_swkbd: Fix potential memory leaks. 2022-01-20 00:38:36 +01:00
Maschell
ce2cd4e843 libwhb: Add option to log to the LoggingModule 2021-11-06 17:28:09 +01:00
Maschell
563b9d6c89 libwhb: return true if a log handler is already present 2021-11-06 17:28:09 +01:00
fincs
eb0306184d
wutsocket: Revise automatic initialization, see details:
- __init/fini_wut_socket have been simplified and are now weak,
  this is intended to allow users to customize their behaviour
- socket_lib_init/exit have been restored as regular imports and are
  no longer using RPLWRAP
- __wut_socket_init/fini_devoptab are now exposed as global symbols,
  intended to be used in custom socket init/deinit logic
2021-09-18 16:57:29 +02:00
GaryOderNichts
d0dc9869e5 wutsocket: avoid aliasing issues 2021-03-07 16:40:55 +01:00
GaryOderNichts
174b0c0a86 wutsocket: implement gethostid and gethostname 2021-03-07 16:40:55 +01:00
GaryOderNichts
f1e9cbd58a wutsocket: implement missing functions 2021-03-07 16:40:55 +01:00
fincs
efc1bd47ff
wutsocket: only link in networking layer if actually used 2021-03-07 13:36:59 +01:00
rw-r-r-0644
c377cffe13
Network socket changes (#136) 2021-03-07 13:09:12 +01:00