This commit is contained in:
施羿廷 authored and ytshih committed 2026-04-02 22:50:58 +08:00
1 parent fe65d46df7
commit b582884995
19 files changed
+389 -189

No files matched your search

+2
View File
@@ -308,6 +308,7 @@ int
OpenForWrite(char *name)
{
int fd = open(name, O_RDWR|O_CREAT|O_TRUNC, 0666);
// cerr << "OpenForWrite name, fd: " << (int)name << ", " << fd << endl;
ASSERT(fd >= 0);
return fd;
@@ -325,6 +326,7 @@ int
OpenForReadWrite(char *name, bool crashOnError)
{
int fd = open(name, O_RDWR, 0);
// cerr << "OpenForReadWrite name, fd: " << (int)name << ", " << fd << endl;
ASSERT(!crashOnError || fd >= 0);
return fd;