nfs4: Remove unnecessary 'Get' prefixes from accessor methods
This commit is contained in:
@@ -34,7 +34,7 @@ Auth::CreateNone()
|
||||
|
||||
auth->fStream.AddInt(AUTH_NONE);
|
||||
auth->fStream.AddOpaque(NULL, 0);
|
||||
if (auth->fStream.GetError() != B_OK) {
|
||||
if (auth->fStream.Error() != B_OK) {
|
||||
delete auth;
|
||||
return NULL;
|
||||
}
|
||||
@@ -72,14 +72,14 @@ Auth::CreateSys()
|
||||
} else
|
||||
xdr.AddUInt(0);
|
||||
free(groups);
|
||||
if (xdr.GetError() != B_OK) {
|
||||
if (xdr.Error() != B_OK) {
|
||||
delete auth;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
auth->fStream.AddInt(AUTH_SYS);
|
||||
auth->fStream.AddOpaque(xdr);
|
||||
if (auth->fStream.GetError() != B_OK) {
|
||||
if (auth->fStream.Error() != B_OK) {
|
||||
delete auth;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ enum auth_flavour {
|
||||
|
||||
class Auth {
|
||||
public:
|
||||
inline const XDR::WriteStream& GetStream() const;
|
||||
inline const XDR::WriteStream& Stream() const;
|
||||
|
||||
static const Auth* CreateNone();
|
||||
static const Auth* CreateSys();
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
|
||||
|
||||
inline const XDR::WriteStream&
|
||||
Auth::GetStream() const
|
||||
Auth::Stream() const
|
||||
{
|
||||
return fStream;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ Call::Create(uint32 proc, const Auth* creds, const Auth* ver)
|
||||
return NULL;
|
||||
|
||||
// XID will be determined and set by RPC::Server
|
||||
call->fXIDPosition = call->fStream.GetCurrent();
|
||||
call->fXIDPosition = call->fStream.Current();
|
||||
call->fStream.AddUInt(0);
|
||||
|
||||
call->fStream.AddInt(CALL);
|
||||
@@ -49,13 +49,13 @@ Call::Create(uint32 proc, const Auth* creds, const Auth* ver)
|
||||
call->fStream.AddUInt(NFS_VERSION);
|
||||
call->fStream.AddUInt(proc);
|
||||
|
||||
call->fStream.Append(creds->GetStream());
|
||||
call->fStream.Append(creds->Stream());
|
||||
delete creds;
|
||||
|
||||
call->fStream.Append(ver->GetStream());
|
||||
call->fStream.Append(ver->Stream());
|
||||
delete ver;
|
||||
|
||||
if (call->fStream.GetError() != B_OK) {
|
||||
if (call->fStream.Error() != B_OK) {
|
||||
delete call;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
|
||||
void SetXID(uint32 x);
|
||||
|
||||
inline XDR::WriteStream& GetStream();
|
||||
inline XDR::WriteStream& Stream();
|
||||
|
||||
private:
|
||||
Call();
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
|
||||
|
||||
inline XDR::WriteStream&
|
||||
Call::GetStream()
|
||||
Call::Stream()
|
||||
{
|
||||
return fStream;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ public:
|
||||
|
||||
inline uint32 GetXID();
|
||||
|
||||
inline status_t GetError();
|
||||
inline XDR::ReadStream& GetStream();
|
||||
inline status_t Error();
|
||||
inline XDR::ReadStream& Stream();
|
||||
|
||||
private:
|
||||
uint32 fXID;
|
||||
@@ -41,14 +41,14 @@ Reply::GetXID()
|
||||
|
||||
|
||||
inline status_t
|
||||
Reply::GetError()
|
||||
Reply::Error()
|
||||
{
|
||||
return fError;
|
||||
}
|
||||
|
||||
|
||||
inline XDR::ReadStream&
|
||||
Reply::GetStream()
|
||||
Reply::Stream()
|
||||
{
|
||||
return fStream;
|
||||
}
|
||||
|
||||
@@ -285,19 +285,19 @@ WriteStream::AddOpaque(const void *ptr, uint32 size)
|
||||
status_t
|
||||
WriteStream::AddOpaque(const WriteStream& stream)
|
||||
{
|
||||
return AddOpaque(stream.GetBuffer(), stream.GetSize());
|
||||
return AddOpaque(stream.Buffer(), stream.Size());
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
WriteStream::Append(const WriteStream& stream)
|
||||
{
|
||||
uint32 size = stream.GetSize();
|
||||
uint32 size = stream.Size();
|
||||
status_t err = _CheckResize(size);
|
||||
if (err != B_OK)
|
||||
return err;
|
||||
|
||||
memcpy(fBuffer + fPosition, stream.GetBuffer(), size);
|
||||
memcpy(fBuffer + fPosition, stream.Buffer(), size);
|
||||
fPosition += size / sizeof(int32);
|
||||
|
||||
return B_OK;
|
||||
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
|
||||
virtual ~Stream();
|
||||
|
||||
inline const void* GetBuffer() const;
|
||||
inline Position GetCurrent() const;
|
||||
inline const void* Buffer() const;
|
||||
inline Position Current() const;
|
||||
|
||||
protected:
|
||||
Stream(void* buffer, uint32 size);
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
ReadStream(void* buffer, uint32 size);
|
||||
virtual ~ReadStream();
|
||||
|
||||
inline int GetSize() const;
|
||||
inline int Size() const;
|
||||
|
||||
int32 GetInt();
|
||||
uint32 GetUInt();
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
WriteStream(const WriteStream& x);
|
||||
virtual ~WriteStream();
|
||||
|
||||
inline int GetSize() const;
|
||||
inline int Size() const;
|
||||
|
||||
status_t InsertUInt(Stream::Position pos, uint32 x);
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
status_t Append(const WriteStream& stream);
|
||||
|
||||
inline status_t GetError() const;
|
||||
inline status_t Error() const;
|
||||
|
||||
private:
|
||||
status_t _CheckResize(uint32 size);
|
||||
@@ -94,21 +94,21 @@ private:
|
||||
|
||||
|
||||
inline const void*
|
||||
Stream::GetBuffer() const
|
||||
Stream::Buffer() const
|
||||
{
|
||||
return fBuffer;
|
||||
}
|
||||
|
||||
|
||||
inline Stream::Position
|
||||
Stream::GetCurrent() const
|
||||
Stream::Current() const
|
||||
{
|
||||
return fPosition;
|
||||
}
|
||||
|
||||
|
||||
inline int
|
||||
ReadStream::GetSize() const
|
||||
ReadStream::Size() const
|
||||
{
|
||||
return fSize;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ ReadStream::GetBoolean()
|
||||
|
||||
|
||||
inline int
|
||||
WriteStream::GetSize() const
|
||||
WriteStream::Size() const
|
||||
{
|
||||
return fPosition * sizeof(uint32);
|
||||
}
|
||||
@@ -143,7 +143,7 @@ WriteStream::AddBoolean(bool x)
|
||||
|
||||
|
||||
inline status_t
|
||||
WriteStream::GetError() const
|
||||
WriteStream::Error() const
|
||||
{
|
||||
return fError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user