0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 10:08:56 +02:00

ircd::fs: Add derror log msg w/ path on fd open system_error.

This commit is contained in:
Jason Volk 2020-05-08 18:13:51 -07:00
parent d9afb64f40
commit 1720aea7e2

View file

@ -1914,6 +1914,7 @@ ircd::fs::fd::fd(const string_view &path)
ircd::fs::fd::fd(const string_view &path,
const opts &opts)
try
:fdno{[&path, &opts]
() -> int
{
@ -1937,6 +1938,15 @@ ircd::fs::fd::fd(const string_view &path,
if(opts.ate)
syscall(::lseek, fdno, 0, SEEK_END);
}
catch(const std::system_error &e)
{
log::derror
{
log, "`%s' :%s",
path,
e.what(),
};
}
ircd::fs::fd::fd(fd &&o)
noexcept