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