clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -49,7 +49,7 @@ static void fail(const char* msg) {
|
||||
exit_now(1);
|
||||
}
|
||||
|
||||
static void fail_status(const char* what, uint32_t status) {
|
||||
static void fail_status(const char* what, KSTATUS status) {
|
||||
print("dirty_writeback: ");
|
||||
print(what);
|
||||
print(" failed status=");
|
||||
@@ -64,11 +64,11 @@ static uint32_t query_cache(SYS_FILE_CACHE_STATS* out) {
|
||||
}
|
||||
|
||||
// Deletes one test path.
|
||||
static uint32_t delete_path(const char* path) {
|
||||
static KSTATUS delete_path(const char* path) {
|
||||
return NtlDeleteFile(SysSvFromCstr(path));
|
||||
}
|
||||
|
||||
static uint32_t create_temp(uint32_t* fileOut, const char** pathOut) {
|
||||
static KSTATUS create_temp(uint32_t* fileOut, const char** pathOut) {
|
||||
// Writable QEMU vvfat maps long-name creation through a host rename and
|
||||
// can abort before the guest receives an I/O status. Keep this file in
|
||||
// 8.3 form so the test measures writeback rather than the host bridge.
|
||||
@@ -79,7 +79,7 @@ static uint32_t create_temp(uint32_t* fileOut, const char** pathOut) {
|
||||
for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i) {
|
||||
uint32_t h = 0;
|
||||
(void)delete_path(paths[i]);
|
||||
uint32_t s = NtlOpenFile(SysSvFromCstr(paths[i]),
|
||||
KSTATUS s = NtlOpenFile(SysSvFromCstr(paths[i]),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_WRITE | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_CREATE_NEW,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
@@ -94,9 +94,9 @@ static uint32_t create_temp(uint32_t* fileOut, const char** pathOut) {
|
||||
return NTLSTATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
static uint32_t open_path(const char* path, uint32_t* fileOut) {
|
||||
static KSTATUS open_path(const char* path, uint32_t* fileOut) {
|
||||
uint32_t h = 0;
|
||||
uint32_t s = NtlOpenFile(SysSvFromCstr(path),
|
||||
KSTATUS s = NtlOpenFile(SysSvFromCstr(path),
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
@@ -116,7 +116,7 @@ static void fill_patterns(void) {
|
||||
static void checked_write(uint32_t file, const void* buffer, size_t size, const char* what) {
|
||||
size_t done = 0;
|
||||
SYS_FILE_IO_REQUEST req = SysMakeFileIoRequest(file, buffer, size, &done);
|
||||
uint32_t s = SysWriteFile(&req);
|
||||
KSTATUS s = SysWriteFile(&req);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status(what, s);
|
||||
if (done != size) fail("short write");
|
||||
}
|
||||
@@ -125,13 +125,13 @@ static void checked_read(uint32_t file, void* buffer, size_t size, size_t* gotOu
|
||||
size_t got = 0;
|
||||
memset(buffer, 0xCC, size);
|
||||
SYS_FILE_IO_REQUEST req = SysMakeFileIoRequest(file, buffer, size, &got);
|
||||
uint32_t s = SysReadFile(&req);
|
||||
KSTATUS s = SysReadFile(&req);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status(what, s);
|
||||
if (gotOut) *gotOut = got;
|
||||
}
|
||||
|
||||
static void checked_seek(uint32_t file, uint64_t offset, const char* what) {
|
||||
uint32_t s = SysSeekFile(file, offset);
|
||||
KSTATUS s = SysSeekFile(file, offset);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status(what, s);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user