mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Merge pull request #385 from trapexit/clone-errors
make fs::attr return ENOTSUP on EINVAL #381
This commit is contained in:
commit
9486bc9b21
2 changed files with 16 additions and 4 deletions
|
|
@ -35,7 +35,13 @@ namespace fs
|
|||
get_fs_ioc_flags(const int fd,
|
||||
int &flags)
|
||||
{
|
||||
return fs::ioctl(fd,FS_IOC_GETFLAGS,(void*)&flags);
|
||||
int rv;
|
||||
|
||||
rv = fs::ioctl(fd,FS_IOC_GETFLAGS,(void*)&flags);
|
||||
if((rv == -1) && (errno == EINVAL))
|
||||
errno = ENOTSUP;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static
|
||||
|
|
@ -68,7 +74,13 @@ namespace fs
|
|||
set_fs_ioc_flags(const int fd,
|
||||
const int flags)
|
||||
{
|
||||
return fs::ioctl(fd,FS_IOC_SETFLAGS,(void*)&flags);
|
||||
int rv;
|
||||
|
||||
rv = fs::ioctl(fd,FS_IOC_SETFLAGS,(void*)&flags);
|
||||
if((rv == -1) && (errno == EINVAL))
|
||||
errno = ENOTSUP;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ namespace fs
|
|||
copy(const int fdin,
|
||||
const int fdout)
|
||||
{
|
||||
return ENOTSUP;
|
||||
return (errno=ENOTSUP,-1);
|
||||
}
|
||||
|
||||
int
|
||||
copy(const std::string &from,
|
||||
const std::string &to)
|
||||
{
|
||||
return ENOTSUP;
|
||||
return (errno=ENOTSUP,-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue