mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 23:16:27 -05:00
* Provides: slight improvement in performance as it no longer will need to find and then act on the files. * It doesn't make sense to support all original policy types. Most people used 'newest' or 'ff' and 'combine' is a better default which has same runtime as 'newest' but with better output.
41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
/*
|
|
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#include "fuse_removexattr.hpp"
|
|
|
|
#include "config.hpp"
|
|
#include "errno.hpp"
|
|
|
|
#include "fuse.h"
|
|
|
|
|
|
int
|
|
FUSE::removexattr(const fuse_req_ctx_t *ctx_,
|
|
const char *fusepath_,
|
|
const char *attrname_)
|
|
{
|
|
const fs::path fusepath{fusepath_};
|
|
|
|
if(Config::is_ctrl_file(fusepath))
|
|
return -EROFS;
|
|
|
|
if(cfg.xattr.to_int())
|
|
return -cfg.xattr.to_int();
|
|
|
|
return cfg.removexattr(cfg.branches,
|
|
fusepath,
|
|
attrname_);
|
|
}
|