0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-04 21:08:57 +01:00

ircd::fs: Save the std openmode in the fd::opts struct.

This commit is contained in:
Jason Volk 2018-11-01 23:35:52 -07:00
parent 10cf8e798c
commit 94bfe39ec6
2 changed files with 8 additions and 1 deletions

View file

@ -45,6 +45,9 @@ struct ircd::fs::fd
struct ircd::fs::fd::opts struct ircd::fs::fd::opts
{ {
/// std openmode passed from ctor.
std::ios::openmode mode {std::ios::openmode(0)};
/// open(2) flags. Usually generated from ios::open_mode ctor. /// open(2) flags. Usually generated from ios::open_mode ctor.
ulong flags {0}; ulong flags {0};

View file

@ -652,7 +652,11 @@ ircd::fs::path_str(const string_view &s)
// //
ircd::fs::fd::opts::opts(const std::ios::openmode &mode) ircd::fs::fd::opts::opts(const std::ios::openmode &mode)
:flags :mode
{
mode
}
,flags
{ {
posix_flags(mode) posix_flags(mode)
} }