mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-25 18:40:18 -04:00
Misc fixes, mostly for FreeBSD (#1536)
This commit is contained in:
parent
7a9c3b7eb2
commit
46f85c0f6d
27 changed files with 146 additions and 140 deletions
4
Makefile
4
Makefile
|
|
@ -115,9 +115,7 @@ LIBFUSE := libfuse/$(BUILDDIR)/libfuse.a
|
|||
LDFLAGS ?=
|
||||
LDLIBS := \
|
||||
-lrt \
|
||||
-latomic \
|
||||
-pthread \
|
||||
-lstdc++fs
|
||||
-pthread
|
||||
override LDLIBS += \
|
||||
$(LIBFUSE)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ namespace fs
|
|||
struct dirent64
|
||||
{
|
||||
public:
|
||||
uint64_t d_ino;
|
||||
int64_t d_off;
|
||||
uint16_t d_reclen;
|
||||
uint8_t d_type;
|
||||
char d_name[];
|
||||
uint64_t ino;
|
||||
int64_t off;
|
||||
uint16_t reclen;
|
||||
uint8_t type;
|
||||
char name[];
|
||||
|
||||
public:
|
||||
int d_namelen() const
|
||||
int namelen() const
|
||||
{
|
||||
return (d_reclen - offsetof(dirent64,d_name));
|
||||
return (reclen - offsetof(dirent64,name));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -526,12 +526,12 @@ struct fuse_operations
|
|||
* destination. Effectively doing an inefficient copy of the
|
||||
* data.
|
||||
*/
|
||||
ssize_t (*copy_file_range)(const fuse_file_info_t *fi_in,
|
||||
off_t offset_in,
|
||||
const fuse_file_info_t *fi_out,
|
||||
off_t offset_out,
|
||||
size_t size,
|
||||
int flags);
|
||||
ssize_t (*copy_file_range)(const fuse_file_info_t *src_fi,
|
||||
off_t src_off,
|
||||
const fuse_file_info_t *dst_fi,
|
||||
off_t dst_off,
|
||||
const size_t size,
|
||||
const unsigned int flags);
|
||||
|
||||
ssize_t (*setupmapping)(uint64_t *fh_,
|
||||
uint64_t foffset_,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
template<typename FuncType>
|
||||
[[nodiscard]]
|
||||
std::future<typename std::result_of<FuncType()>::type>
|
||||
std::future<std::invoke_result_t<FuncType>>
|
||||
enqueue_task(FuncType&& func_);
|
||||
|
||||
public:
|
||||
|
|
@ -340,10 +340,10 @@ ThreadPool::enqueue_work(FuncType &&func_)
|
|||
template<typename FuncType>
|
||||
[[nodiscard]]
|
||||
inline
|
||||
std::future<typename std::result_of<FuncType()>::type>
|
||||
std::future<std::invoke_result_t<FuncType>>
|
||||
ThreadPool::enqueue_task(FuncType&& func_)
|
||||
{
|
||||
using TaskReturnType = typename std::result_of<FuncType()>::type;
|
||||
using TaskReturnType = std::invoke_result_t<FuncType>;
|
||||
using Promise = std::promise<TaskReturnType>;
|
||||
|
||||
Promise promise;
|
||||
|
|
|
|||
|
|
@ -122,10 +122,10 @@ fuse_dirents_add(fuse_dirents_t *d_,
|
|||
|
||||
d->off = kv_size(d_->offs);
|
||||
kv_push(uint32_t,d_->offs,kv_size(d_->data));
|
||||
d->ino = de_->d_ino;
|
||||
d->ino = de_->ino;
|
||||
d->namelen = namelen_;
|
||||
d->type = de_->d_type;
|
||||
memcpy(d->name,de_->d_name,namelen_);
|
||||
d->type = de_->type;
|
||||
memcpy(d->name,de_->name,namelen_);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include "fuse_i.h"
|
||||
#include "fuse_misc.h"
|
||||
#include "fuse_opt.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -18,14 +18,16 @@
|
|||
|
||||
#include "fh.hpp"
|
||||
|
||||
#include "int_types.h"
|
||||
|
||||
|
||||
class DirInfo : public FH
|
||||
{
|
||||
public:
|
||||
static DirInfo *from_fh(const uint64_t fh);
|
||||
static DirInfo *from_fh(const u64 fh);
|
||||
|
||||
public:
|
||||
uint64_t to_fh() const;
|
||||
u64 to_fh() const;
|
||||
|
||||
public:
|
||||
DirInfo(const fs::path &fusepath_)
|
||||
|
|
@ -38,12 +40,12 @@ inline
|
|||
uint64_t
|
||||
DirInfo::to_fh() const
|
||||
{
|
||||
return reinterpret_cast<uint64_t>(this);
|
||||
return reinterpret_cast<u64>(this);
|
||||
}
|
||||
|
||||
inline
|
||||
DirInfo*
|
||||
DirInfo::from_fh(const uint64_t fh_)
|
||||
DirInfo::from_fh(const u64 fh_)
|
||||
{
|
||||
return reinterpret_cast<DirInfo*>(fh_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
class FileInfo : public FH
|
||||
{
|
||||
public:
|
||||
static FileInfo *from_fh(const uintptr_t fh);
|
||||
static FileInfo *from_fh(const u64 fh);
|
||||
|
||||
public:
|
||||
FileInfo(const int fd_,
|
||||
|
|
@ -62,7 +62,7 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
uint64_t to_fh() const;
|
||||
u64 to_fh() const;
|
||||
|
||||
public:
|
||||
int fd;
|
||||
|
|
@ -72,15 +72,15 @@ public:
|
|||
};
|
||||
|
||||
inline
|
||||
uintptr_t
|
||||
u64
|
||||
FileInfo::to_fh() const
|
||||
{
|
||||
return reinterpret_cast<uintptr_t>(this);
|
||||
return reinterpret_cast<u64>(this);
|
||||
}
|
||||
|
||||
inline
|
||||
FileInfo*
|
||||
FileInfo::from_fh(const uintptr_t fh_)
|
||||
FileInfo::from_fh(const u64 fh_)
|
||||
{
|
||||
return reinterpret_cast<FileInfo*>(fh_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,16 @@
|
|||
|
||||
|
||||
int
|
||||
fs::attr::copy(const int fdin,
|
||||
const int fdout)
|
||||
fs::attr::copy(const int fdin_,
|
||||
const int fdout_,
|
||||
const u32 flags_)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
int
|
||||
fs::attr::copy(const std::string &from,
|
||||
const std::string &to)
|
||||
fs::attr::copy(const std::string &from_,
|
||||
const std::string &to_)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "fs_copy_file_range.hpp"
|
||||
|
||||
#ifdef __linux__
|
||||
#pragma message "using fs_copy_file_range_linux.icpp"
|
||||
#include "fs_copy_file_range_linux.icpp"
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@
|
|||
|
||||
namespace fs
|
||||
{
|
||||
int64_t
|
||||
copy_file_range(const int fd_in,
|
||||
int64_t *off_in,
|
||||
const int fd_out,
|
||||
int64_t *off_out,
|
||||
const uint64_t len,
|
||||
ssize_t
|
||||
copy_file_range(const int src_fd_,
|
||||
off_t *src_off_,
|
||||
const int dst_fd_,
|
||||
off_t *dst_off_,
|
||||
const size_t len,
|
||||
const unsigned int flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,30 +34,30 @@
|
|||
|
||||
|
||||
static
|
||||
int64_t
|
||||
_copy_file_range_(int src_fd_,
|
||||
int64_t *src_off_,
|
||||
int tgt_fd_,
|
||||
int64_t *tgt_off_,
|
||||
const uint64_t len_,
|
||||
ssize_t
|
||||
_copy_file_range_(const int src_fd_,
|
||||
off_t *src_off_,
|
||||
const int dst_fd_,
|
||||
off_t *dst_off_,
|
||||
const size_t len_,
|
||||
const unsigned int flags_)
|
||||
{
|
||||
#ifdef SYS_copy_file_range
|
||||
int64_t rv;
|
||||
loff_t src_off;
|
||||
loff_t tgt_off;
|
||||
loff_t dst_off;
|
||||
loff_t *src_off_ptr;
|
||||
loff_t *tgt_off_ptr;
|
||||
loff_t *dst_off_ptr;
|
||||
|
||||
src_off = ((src_off_ == NULL) ? 0 : *src_off_);
|
||||
tgt_off = ((tgt_off_ == NULL) ? 0 : *tgt_off_);
|
||||
dst_off = ((dst_off_ == NULL) ? 0 : *dst_off_);
|
||||
src_off_ptr = ((src_off_ == NULL) ? NULL : &src_off);
|
||||
tgt_off_ptr = ((tgt_off_ == NULL) ? NULL : &tgt_off);
|
||||
dst_off_ptr = ((dst_off_ == NULL) ? NULL : &dst_off);
|
||||
rv = ::syscall(SYS_copy_file_range,
|
||||
src_fd_,
|
||||
src_off_ptr,
|
||||
tgt_fd_,
|
||||
tgt_off_ptr,
|
||||
dst_fd_,
|
||||
dst_off_ptr,
|
||||
len_,
|
||||
flags_);
|
||||
|
||||
|
|
@ -65,8 +65,8 @@ _copy_file_range_(int src_fd_,
|
|||
{
|
||||
if(src_off_ != NULL)
|
||||
*src_off_ = src_off;
|
||||
if(tgt_off_ != NULL)
|
||||
*tgt_off_ = tgt_off;
|
||||
if(dst_off_ != NULL)
|
||||
*dst_off_ = dst_off;
|
||||
}
|
||||
|
||||
return ::to_neg_errno(rv);
|
||||
|
|
@ -75,18 +75,18 @@ _copy_file_range_(int src_fd_,
|
|||
#endif
|
||||
}
|
||||
|
||||
int64_t
|
||||
ssize_t
|
||||
fs::copy_file_range(const int src_fd_,
|
||||
int64_t *src_off_,
|
||||
const int tgt_fd_,
|
||||
int64_t *tgt_off_,
|
||||
const uint64_t len_,
|
||||
off_t *src_off_,
|
||||
const int dst_fd_,
|
||||
off_t *dst_off_,
|
||||
const size_t len_,
|
||||
const unsigned int flags_)
|
||||
{
|
||||
return ::_copy_file_range_(src_fd_,
|
||||
src_off_,
|
||||
tgt_fd_,
|
||||
tgt_off_,
|
||||
dst_fd_,
|
||||
dst_off_,
|
||||
len_,
|
||||
flags_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,18 +28,9 @@
|
|||
|
||||
ssize_t
|
||||
fs::copy_file_range(const int fd_in_,
|
||||
int64_t *off_in_,
|
||||
const int fd_out_,
|
||||
int64_t *off_out_,
|
||||
const size_t len_,
|
||||
const unsigned int flags_)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ssize_t
|
||||
fs::copy_file_range(const int fd_in_,
|
||||
off_t *off_in_,
|
||||
const int fd_out_,
|
||||
off_t *off_out_,
|
||||
const size_t len_,
|
||||
const unsigned int flags_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,6 +164,11 @@ fs::copyfile(const int src_fd_,
|
|||
return rv;
|
||||
}
|
||||
|
||||
// For FreeBSD
|
||||
#ifndef O_NOATIME
|
||||
#define O_NOATIME 0
|
||||
#endif
|
||||
|
||||
s64
|
||||
fs::copyfile(const fs::path &src_filepath_,
|
||||
const fs::path &dst_filepath_,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#include "to_neg_errno.hpp"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined __linux__
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <mntent.h>
|
||||
|
||||
#ifdef __linux__
|
||||
void
|
||||
fs::mounts(fs::MountVec &mounts_)
|
||||
{
|
||||
|
|
@ -29,9 +29,12 @@ fs::mounts(fs::MountVec &mounts_)
|
|||
|
||||
::endmntent(f);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
fs::mounts(fs::MountVec &mounts_)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
namespace fs
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,19 +27,19 @@
|
|||
|
||||
static
|
||||
ssize_t
|
||||
_copy_file_range(const int fd_in_,
|
||||
off_t offset_in_,
|
||||
const int fd_out_,
|
||||
off_t offset_out_,
|
||||
_copy_file_range(const int src_fd_,
|
||||
off_t src_off_,
|
||||
const int dst_fd_,
|
||||
off_t dst_off_,
|
||||
size_t size_,
|
||||
int flags_)
|
||||
{
|
||||
ssize_t rv;
|
||||
|
||||
rv = fs::copy_file_range(fd_in_,
|
||||
&offset_in_,
|
||||
fd_out_,
|
||||
&offset_out_,
|
||||
rv = fs::copy_file_range(src_fd_,
|
||||
&src_off_,
|
||||
dst_fd_,
|
||||
&dst_off_,
|
||||
size_,
|
||||
flags_);
|
||||
|
||||
|
|
@ -47,20 +47,20 @@ _copy_file_range(const int fd_in_,
|
|||
}
|
||||
|
||||
ssize_t
|
||||
FUSE::copy_file_range(const fuse_file_info_t *ffi_in_,
|
||||
off_t offset_in_,
|
||||
const fuse_file_info_t *ffi_out_,
|
||||
off_t offset_out_,
|
||||
size_t size_,
|
||||
int flags_)
|
||||
FUSE::copy_file_range(const fuse_file_info_t *src_ffi_,
|
||||
off_t src_off_,
|
||||
const fuse_file_info_t *dst_ffi_,
|
||||
off_t dst_off_,
|
||||
const size_t size_,
|
||||
const unsigned int flags_)
|
||||
{
|
||||
FileInfo *fi_in = FileInfo::from_fh(ffi_in_->fh);
|
||||
FileInfo *fi_out = FileInfo::from_fh(ffi_out_->fh);
|
||||
FileInfo *src_fi = FileInfo::from_fh(src_ffi_->fh);
|
||||
FileInfo *dst_fi = FileInfo::from_fh(dst_ffi_->fh);
|
||||
|
||||
return ::_copy_file_range(fi_in->fd,
|
||||
offset_in_,
|
||||
fi_out->fd,
|
||||
offset_out_,
|
||||
return ::_copy_file_range(src_fi->fd,
|
||||
src_off_,
|
||||
dst_fi->fd,
|
||||
dst_off_,
|
||||
size_,
|
||||
flags_);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ namespace FUSE
|
|||
off_t offset_in,
|
||||
const fuse_file_info_t *ffi_out,
|
||||
off_t offset_out,
|
||||
size_t size,
|
||||
int flags);
|
||||
const size_t size,
|
||||
const unsigned int flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,20 +52,20 @@ _readdir(const fs::path &branch_path_,
|
|||
int namelen;
|
||||
fs::dirent64 *d = reinterpret_cast<fs::dirent64*>(&buf->mem[pos]);
|
||||
|
||||
pos += d->d_reclen;
|
||||
pos += d->reclen;
|
||||
|
||||
namelen = d->d_namelen();
|
||||
namelen = d->namelen();
|
||||
|
||||
rv = names_.put(d->d_name,namelen);
|
||||
rv = names_.put(d->name,namelen);
|
||||
if(rv == 0)
|
||||
continue;
|
||||
|
||||
rel_filepath.replace_filename(d->d_name);
|
||||
rel_filepath.replace_filename(d->name);
|
||||
|
||||
d->d_ino = fs::inode::calc(branch_path_,
|
||||
rel_filepath,
|
||||
DTTOIF(d->d_type),
|
||||
d->d_ino);
|
||||
d->ino = fs::inode::calc(branch_path_,
|
||||
rel_filepath,
|
||||
DTTOIF(d->type),
|
||||
d->ino);
|
||||
|
||||
fuse_dirents_add(dirents_,d,namelen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,20 +101,20 @@ _readdir(std::vector<std::future<DirRV>> &dh_futures_,
|
|||
int namelen;
|
||||
fs::dirent64 *d = reinterpret_cast<fs::dirent64*>(&buf->mem[pos]);
|
||||
|
||||
pos += d->d_reclen;
|
||||
pos += d->reclen;
|
||||
|
||||
namelen = d->d_namelen();
|
||||
namelen = d->namelen();
|
||||
|
||||
rv = names.put(d->d_name,namelen);
|
||||
rv = names.put(d->name,namelen);
|
||||
if(rv == 0)
|
||||
continue;
|
||||
|
||||
rel_filepath.replace_filename(d->d_name);
|
||||
rel_filepath.replace_filename(d->name);
|
||||
|
||||
d->d_ino = fs::inode::calc(*dirrv.branch_path,
|
||||
rel_filepath,
|
||||
DTTOIF(d->d_type),
|
||||
d->d_ino);
|
||||
d->ino = fs::inode::calc(*dirrv.branch_path,
|
||||
rel_filepath,
|
||||
DTTOIF(d->type),
|
||||
d->ino);
|
||||
|
||||
fuse_dirents_add(dirents_,d,namelen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ _opendir(ThreadPool &tp_,
|
|||
static
|
||||
inline
|
||||
int
|
||||
_readdir(const std::vector<std::future<DirRV>> &dh_futures_,
|
||||
const fs::path &rel_dirpath_,
|
||||
fuse_dirents_t *dirents_)
|
||||
_readdir(std::vector<std::future<DirRV>> &dh_futures_,
|
||||
const fs::path &rel_dirpath_,
|
||||
fuse_dirents_t *dirents_)
|
||||
{
|
||||
Err err;
|
||||
HashSet names;
|
||||
|
|
|
|||
|
|
@ -57,20 +57,20 @@ _readdir(const Branches::Ptr &branches_,
|
|||
int namelen;
|
||||
fs::dirent64 *d = reinterpret_cast<fs::dirent64*>(&buf->mem[pos]);
|
||||
|
||||
pos += d->d_reclen;
|
||||
pos += d->reclen;
|
||||
|
||||
namelen = d->d_namelen();
|
||||
namelen = d->namelen();
|
||||
|
||||
rv = names.put(d->d_name,namelen);
|
||||
rv = names.put(d->name,namelen);
|
||||
if(rv == 0)
|
||||
continue;
|
||||
|
||||
rel_filepath.replace_filename(d->d_name);
|
||||
rel_filepath.replace_filename(d->name);
|
||||
|
||||
d->d_ino = fs::inode::calc(branch.path,
|
||||
rel_filepath,
|
||||
DTTOIF(d->d_type),
|
||||
d->d_ino);
|
||||
d->ino = fs::inode::calc(branch.path,
|
||||
rel_filepath,
|
||||
DTTOIF(d->type),
|
||||
d->ino);
|
||||
|
||||
fuse_dirents_add(dirents_,d,namelen);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ _readdir(const Branches::Ptr &branches_,
|
|||
fs::path rel_filepath;
|
||||
fs::path abs_dirpath;
|
||||
|
||||
fuse_dirents_reset(buf_);
|
||||
fuse_dirents_reset(dirents_);
|
||||
|
||||
rel_filepath = rel_dirpath_ / "dummy";
|
||||
for(const auto &branch : *branches_)
|
||||
|
|
@ -73,7 +73,7 @@ _readdir(const Branches::Ptr &branches_,
|
|||
DTTOIF(de->d_type),
|
||||
de->d_ino);
|
||||
|
||||
fuse_dirents_add(buf_,de,namelen);
|
||||
fuse_dirents_add(dirents_,de,namelen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#include "ioprio.hpp"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __linux__
|
||||
# include <sys/syscall.h>
|
||||
# include <unistd.h>
|
||||
# include <errno.h>
|
||||
#else
|
||||
#warning "ioprio not supported on this platform"
|
||||
#endif
|
||||
|
|
@ -17,33 +18,33 @@ thread_local int ioprio::SetFrom::thread_prio = -1;
|
|||
bool _enabled = false;
|
||||
|
||||
int
|
||||
ioprio::get(const int which_,
|
||||
const int who_)
|
||||
ioprio::get(const int who_)
|
||||
{
|
||||
#ifdef SYS_ioprio_get
|
||||
int rv;
|
||||
const int which = IOPRIO_WHO_PROCESS;
|
||||
|
||||
rv = syscall(SYS_ioprio_get,which_,who_);
|
||||
rv = syscall(SYS_ioprio_get,which,who_);
|
||||
|
||||
return ((rv == -1) ? -errno : rv);
|
||||
#else
|
||||
return -ENOSUP;
|
||||
return -EOPNOTSUPP;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
ioprio::set(const int which_,
|
||||
const int who_,
|
||||
ioprio::set(const int who_,
|
||||
const int ioprio_)
|
||||
{
|
||||
#ifdef SYS_ioprio_set
|
||||
int rv;
|
||||
const int which = IOPRIO_WHO_PROCESS;
|
||||
|
||||
rv = syscall(SYS_ioprio_set,which_,who_,ioprio_);
|
||||
rv = syscall(SYS_ioprio_set,which,who_,ioprio_);
|
||||
|
||||
return ((rv == -1) ? -errno : rv);
|
||||
#else
|
||||
return -ENOSUP;
|
||||
return -EOPNOTSUPP;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -66,12 +67,12 @@ ioprio::SetFrom::SetFrom(const pid_t pid_)
|
|||
if(!_enabled)
|
||||
return;
|
||||
|
||||
client_prio = ioprio::get(IOPRIO_WHO_PROCESS,pid_);
|
||||
client_prio = ioprio::get(pid_);
|
||||
if(client_prio < 0)
|
||||
return;
|
||||
if(client_prio == thread_prio)
|
||||
return;
|
||||
|
||||
thread_prio = client_prio;
|
||||
ioprio::set(IOPRIO_WHO_PROCESS,0,client_prio);
|
||||
ioprio::set(0,client_prio);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ namespace ioprio
|
|||
void enable(const bool);
|
||||
bool enabled();
|
||||
|
||||
int get(const int which, const int who);
|
||||
int set(const int which, const int who, const int ioprio);
|
||||
int get(const int who);
|
||||
int set(const int who, const int ioprio);
|
||||
|
||||
struct SetFrom
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class ROToFromWrapper : public ToFromString
|
|||
{
|
||||
public:
|
||||
int
|
||||
from_string(const std::string &s_) final
|
||||
from_string(const std::string_view s_) final
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue