Commit 5b48d597 authored by Max Kellermann's avatar Max Kellermann

system/FileDescriptor: add "mode" parameter to Open()

parent 4dec12fc
......@@ -58,9 +58,9 @@
#endif
bool
FileDescriptor::Open(const char *pathname, int flags)
FileDescriptor::Open(const char *pathname, int flags, mode_t mode)
{
fd = ::open(pathname, flags | O_NOCTTY | O_CLOEXEC);
fd = ::open(pathname, flags | O_NOCTTY | O_CLOEXEC, mode);
return IsDefined();
}
......
......@@ -90,7 +90,7 @@ public:
return FileDescriptor(-1);
}
bool Open(const char *pathname, int flags);
bool Open(const char *pathname, int flags, mode_t mode=0666);
bool OpenReadOnly(const char *pathname);
#ifndef WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment