system/FileDescriptor: add "mode" parameter to Open()
This commit is contained in:
parent
4dec12fcfc
commit
5b48d59769
@ -58,9 +58,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool
|
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();
|
return IsDefined();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public:
|
|||||||
return FileDescriptor(-1);
|
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);
|
bool OpenReadOnly(const char *pathname);
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user