mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 06:16:11 +01:00
nfs4: Add get_vnode_name hook
This commit is contained in:
parent
87c6b83293
commit
96b7b14a96
@ -25,6 +25,7 @@ public:
|
||||
|
||||
inline ino_t ID() const;
|
||||
inline mode_t Type() const;
|
||||
inline const char* Name() const;
|
||||
|
||||
status_t LookUp(const char* name, ino_t* id);
|
||||
status_t Stat(struct stat* st);
|
||||
@ -79,5 +80,12 @@ Inode::Type() const
|
||||
}
|
||||
|
||||
|
||||
inline const char*
|
||||
Inode::Name() const
|
||||
{
|
||||
return fName;
|
||||
}
|
||||
|
||||
|
||||
#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
|
||||
nfs4_put_vnode(fs_volume* volume, fs_vnode* vnode, bool reenter)
|
||||
{
|
||||
@ -242,7 +252,7 @@ fs_volume_ops gNFSv4VolumeOps = {
|
||||
|
||||
fs_vnode_ops gNFSv4VnodeOps = {
|
||||
nfs4_lookup,
|
||||
NULL, // get_vnode_name()
|
||||
nfs4_get_vnode_name,
|
||||
nfs4_put_vnode,
|
||||
NULL, // remove_vnode()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user