|
|
@ -34,9 +34,11 @@ |
|
|
#include <string>
|
|
|
#include <string>
|
|
|
#include <vector>
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
#define TOOBIG_SIZE 65536
|
|
|
|
|
|
|
|
|
using std::istringstream; |
|
|
using std::istringstream; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int |
|
|
int |
|
|
fs::xattr::list(const int fd_, |
|
|
fs::xattr::list(const int fd_, |
|
|
vector<char> *attrs_) |
|
|
vector<char> *attrs_) |
|
|
@ -72,6 +74,11 @@ fs::xattr::list(const string &path_, |
|
|
while(true) |
|
|
while(true) |
|
|
{ |
|
|
{ |
|
|
rv = fs::llistxattr(path_,attrs_->data(),attrs_->size()); |
|
|
rv = fs::llistxattr(path_,attrs_->data(),attrs_->size()); |
|
|
|
|
|
if(rv >= 0) |
|
|
|
|
|
return rv; |
|
|
|
|
|
if(rv != -ERANGE) |
|
|
|
|
|
return rv; |
|
|
|
|
|
if(attrs_->size() > 65536) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return rv; |
|
|
return rv; |
|
|
|