nfs4: Let ReplyInterpreter provide original NFS4 error codes

This commit is contained in:
Pawel Dziepak 2012-06-13 19:38:28 +02:00
parent f2da914d39
commit 462a54ced8
2 changed files with 12 additions and 1 deletions

View File

@ -46,6 +46,7 @@ DirEntry::~DirEntry()
ReplyInterpreter::ReplyInterpreter(RPC::Reply* reply)
:
fNFS4Error(NFS4_OK),
fReply(reply)
{
if (reply != NULL)
@ -62,7 +63,7 @@ ReplyInterpreter::~ReplyInterpreter()
void
ReplyInterpreter::_ParseHeader()
{
fReply->Stream().GetUInt();
fNFS4Error = fReply->Stream().GetUInt();
fReply->Stream().GetOpaque(NULL);
fReply->Stream().GetUInt();
}

View File

@ -45,6 +45,8 @@ public:
inline status_t SetTo(RPC::Reply* reply);
inline void Reset();
inline uint32 NFS4Error();
status_t Access(uint32* supported, uint32* allowed);
status_t Close();
status_t GetAttr(AttrValue** attrs, uint32* count);
@ -72,6 +74,7 @@ private:
static status_t _NFS4ErrorToHaiku(uint32 x);
uint32 fNFS4Error;
RPC::Reply* fReply;
};
@ -99,6 +102,13 @@ ReplyInterpreter::Reset()
}
inline uint32
ReplyInterpreter::NFS4Error()
{
return fNFS4Error;
}
inline status_t
ReplyInterpreter::LookUp()
{