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
@@ -114,7 +114,7 @@ __declspec(dllexport) char* realpath(const char* path, char* resolved_path) {
|
||||
return PosixCopyResolvedPath(path, resolved_path);
|
||||
|
||||
size_t required = 0;
|
||||
uint32_t status = NtlRealPath(SysSvFromCstr(translated), (char*)0, 0, &required);
|
||||
KSTATUS status = NtlRealPath(SysSvFromCstr(translated), (char*)0, 0, &required);
|
||||
if (status != NTLSTATUS_SUCCESS) { errno = PosixStatusToErrno(status); return (char*)0; }
|
||||
if (required == 0 || required > SYS_PATH_MAX + 1u) { errno = ERANGE; return (char*)0; }
|
||||
|
||||
@@ -132,7 +132,7 @@ __declspec(dllexport) DIR* opendir(const char* path) {
|
||||
char native[512];
|
||||
PosixTranslatePath(path, native, sizeof(native));
|
||||
uint32_t kh;
|
||||
uint32_t s = NtlOpenDir(SysSvFromCstr(native),
|
||||
KSTATUS s = NtlOpenDir(SysSvFromCstr(native),
|
||||
SYS_DIR_ACCESS_ENUMERATE | SYS_DIR_ACCESS_OPEN,
|
||||
SYS_DIR_FLAG_NONE, &kh);
|
||||
if (s != 0) { errno = ENOENT; return (DIR*)0; }
|
||||
@@ -149,7 +149,7 @@ __declspec(dllexport) DIR* opendir(const char* path) {
|
||||
__declspec(dllexport) struct dirent* readdir(DIR* d) {
|
||||
if (!d) { errno = EBADF; return (struct dirent*)0; }
|
||||
KDIR_ENTRY ke;
|
||||
uint32_t s = SysReadDir(d->KHandle, &ke);
|
||||
KSTATUS s = SysReadDir(d->KHandle, &ke);
|
||||
if (s != 0) return (struct dirent*)0; // end of directory or error
|
||||
|
||||
size_t len = strlen(ke.Name);
|
||||
@@ -214,7 +214,7 @@ __declspec(dllexport) int stat(const char* path, struct stat* out) {
|
||||
return PosixFillSyntheticStat(S_IFCHR, out);
|
||||
|
||||
SYS_FILE_STAT nativeStat;
|
||||
uint32_t s = NtlStatPath(SysSvFromCstr(p), &nativeStat);
|
||||
KSTATUS s = NtlStatPath(SysSvFromCstr(p), &nativeStat);
|
||||
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
|
||||
return PosixFillStat(&nativeStat, out);
|
||||
}
|
||||
@@ -243,7 +243,7 @@ __declspec(dllexport) int fstat(int fd, struct stat* out) {
|
||||
break;
|
||||
case PosixFdFile: {
|
||||
SYS_FILE_STAT nativeStat;
|
||||
uint32_t status = SysGetFileStat(description->KHandle, &nativeStat);
|
||||
KSTATUS status = SysGetFileStat(description->KHandle, &nativeStat);
|
||||
if (status != NTLSTATUS_SUCCESS)
|
||||
errno = PosixStatusToErrno(status);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user