This commit is contained in:
Kelvin Sherlock 2016-11-04 16:27:41 -04:00
parent 8553e63936
commit ddf67751c3

View File

@ -135,7 +135,7 @@ namespace {
return _displacement; return _displacement;
} }
tool_return<void> xattr_file::set_mark(ssize_t new_mark) { tool_return<size_t> xattr_file::set_mark(ssize_t new_mark) {
if (new_mark < 0) return MacOS::paramErr; if (new_mark < 0) return MacOS::paramErr;
_displacement = new_mark; _displacement = new_mark;
return new_mark; return new_mark;
@ -147,7 +147,7 @@ namespace {
return eof; return eof;
} }
tool_return<void> xattr_file::set_eof(ssize_t new_eof) { tool_return<size_t> xattr_file::set_eof(ssize_t new_eof) {
if (_readonly) return MacOS::wrPermErr; if (_readonly) return MacOS::wrPermErr;
@ -166,6 +166,17 @@ namespace {
} }
uint32_t rforksize(const std::string &path_name)
{
ssize_t ok = getxattr(path_name.c_str(), XATTR_RESOURCEFORK_NAME, NULL, 0);
if (ok < 0) ok = 0;
return ok;
}
} }
namespace native { namespace native {
@ -241,5 +252,4 @@ namespace native {
} }
} }