mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 22:46:34 -05:00
Move everything to negative errno return types (#1499)
This commit is contained in:
parent
2b500f194a
commit
e8cd74cab0
177 changed files with 5952 additions and 5843 deletions
|
|
@ -14,6 +14,8 @@
|
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "fuse_futimens.hpp"
|
||||
|
||||
#include "errno.hpp"
|
||||
#include "fileinfo.hpp"
|
||||
#include "fs_futimens.hpp"
|
||||
|
|
@ -24,44 +26,36 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
|
||||
namespace l
|
||||
static
|
||||
int
|
||||
_futimens(const int fd_,
|
||||
const struct timespec ts_[2])
|
||||
{
|
||||
static
|
||||
int
|
||||
futimens(const int fd_,
|
||||
const struct timespec ts_[2])
|
||||
{
|
||||
int rv;
|
||||
int rv;
|
||||
|
||||
rv = fs::futimens(fd_,ts_);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
rv = fs::futimens(fd_,ts_);
|
||||
|
||||
return rv;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
namespace FUSE
|
||||
int
|
||||
FUSE::futimens(const uint64_t fh_,
|
||||
const struct timespec ts_[2])
|
||||
{
|
||||
int
|
||||
futimens(const uint64_t fh_,
|
||||
const struct timespec ts_[2])
|
||||
{
|
||||
uint64_t fh;
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
uint64_t fh;
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
|
||||
fh = fh_;
|
||||
if(fh == 0)
|
||||
{
|
||||
state.open_files.cvisit(fc->nodeid,
|
||||
[&](auto &val_)
|
||||
{
|
||||
fh = reinterpret_cast<uint64_t>(val_.second.fi);
|
||||
});
|
||||
}
|
||||
fh = fh_;
|
||||
if(fh == 0)
|
||||
{
|
||||
state.open_files.cvisit(fc->nodeid,
|
||||
[&](const auto &val_)
|
||||
{
|
||||
fh = reinterpret_cast<uint64_t>(val_.second.fi);
|
||||
});
|
||||
}
|
||||
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(fh);
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(fh);
|
||||
|
||||
return l::futimens(fi->fd,ts_);
|
||||
}
|
||||
return ::_futimens(fi->fd,ts_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue