nfs4: Add get_vnode_name hook
This commit is contained in:
@@ -25,6 +25,7 @@ public:
|
|||||||
|
|
||||||
inline ino_t ID() const;
|
inline ino_t ID() const;
|
||||||
inline mode_t Type() const;
|
inline mode_t Type() const;
|
||||||
|
inline const char* Name() const;
|
||||||
|
|
||||||
status_t LookUp(const char* name, ino_t* id);
|
status_t LookUp(const char* name, ino_t* id);
|
||||||
status_t Stat(struct stat* st);
|
status_t Stat(struct stat* st);
|
||||||
@@ -79,5 +80,12 @@ Inode::Type() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline const char*
|
||||||
|
Inode::Name() const
|
||||||
|
{
|
||||||
|
return fName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // INODE_H
|
#endif // INODE_H
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,16 @@ nfs4_lookup(fs_volume* volume, fs_vnode* dir, const char* name, ino_t* _id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static status_t
|
||||||
|
nfs4_get_vnode_name(fs_volume* volume, fs_vnode* vnode, char* buffer,
|
||||||
|
size_t bufferSize)
|
||||||
|
{
|
||||||
|
Inode* inode = reinterpret_cast<Inode*>(vnode->private_node);
|
||||||
|
strncpy(buffer, inode->Name(), bufferSize);
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
nfs4_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter)
|
nfs4_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter)
|
||||||
{
|
{
|
||||||
@@ -242,7 +252,7 @@ fs_volume_ops gNFSv4VolumeOps = {
|
|||||||
|
|
||||||
fs_vnode_ops gNFSv4VnodeOps = {
|
fs_vnode_ops gNFSv4VnodeOps = {
|
||||||
nfs4_lookup,
|
nfs4_lookup,
|
||||||
NULL, // get_vnode_name()
|
nfs4_get_vnode_name,
|
||||||
nfs4_put_vnode,
|
nfs4_put_vnode,
|
||||||
NULL, // remove_vnode()
|
NULL, // remove_vnode()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user