mirror of https://github.com/trapexit/mergerfs.git
Browse Source
all action functions return success should at least one succeed. closes #189
pull/195/head
all action functions return success should at least one succeed. closes #189
pull/195/head
Antonio SJ Musumeci
9 years ago
15 changed files with 373 additions and 338 deletions
-
14src/access.cpp
-
9src/chmod.cpp
-
9src/chown.cpp
-
11src/link.cpp
-
9src/mkdir.cpp
-
9src/mknod.cpp
-
9src/removexattr.cpp
-
22src/rename.cpp
-
9src/rmdir.cpp
-
45src/rv.hpp
-
9src/setxattr.cpp
-
7src/symlink.cpp
-
9src/truncate.cpp
-
7src/unlink.cpp
-
9src/utimens.cpp
@ -0,0 +1,45 @@ |
|||
/*
|
|||
The MIT License (MIT) |
|||
|
|||
Copyright (c) 2016 Antonio SJ Musumeci <trapexit@spawn.link> |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in |
|||
all copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|||
THE SOFTWARE. |
|||
*/ |
|||
|
|||
#ifndef __RV_HPP__
|
|||
#define __RV_HPP__
|
|||
|
|||
static |
|||
inline |
|||
int |
|||
calc_error(const int rv, |
|||
const int prev, |
|||
const int cur) |
|||
{ |
|||
if(rv == -1) |
|||
{ |
|||
if(prev == 0) |
|||
return 0; |
|||
return cur; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
#endif // __RV_HPP__
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue