mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:47:44 +00:00
Kernel/DevFS: Make DevFSInode::name() return StringView
This commit is contained in:
parent
6766efff9c
commit
61c1937d02
2 changed files with 7 additions and 7 deletions
|
@ -139,7 +139,7 @@ KResult DevFSInode::truncate(u64)
|
||||||
return EPERM;
|
return EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
String DevFSLinkInode::name() const
|
StringView DevFSLinkInode::name() const
|
||||||
{
|
{
|
||||||
return m_name;
|
return m_name;
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@ KResult DevFSDeviceInode::chown(uid_t uid, gid_t gid)
|
||||||
return KSuccess;
|
return KSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
String DevFSDeviceInode::name() const
|
StringView DevFSDeviceInode::name() const
|
||||||
{
|
{
|
||||||
Locker locker(m_inode_lock);
|
Locker locker(m_inode_lock);
|
||||||
if (m_cached_name.is_null() || m_cached_name.is_empty())
|
if (m_cached_name.is_null() || m_cached_name.is_empty())
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DevFSInode : public Inode {
|
||||||
friend class DevFSRootDirectoryInode;
|
friend class DevFSRootDirectoryInode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual String name() const = 0;
|
virtual StringView name() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DevFSInode(DevFS&);
|
DevFSInode(DevFS&);
|
||||||
|
@ -69,7 +69,7 @@ class DevFSDeviceInode : public DevFSInode {
|
||||||
friend class DevFSRootDirectoryInode;
|
friend class DevFSRootDirectoryInode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual String name() const override;
|
virtual StringView name() const override;
|
||||||
virtual ~DevFSDeviceInode() override;
|
virtual ~DevFSDeviceInode() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -93,7 +93,7 @@ class DevFSLinkInode : public DevFSInode {
|
||||||
friend class DevFSRootDirectoryInode;
|
friend class DevFSRootDirectoryInode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual String name() const override;
|
virtual StringView name() const override;
|
||||||
virtual ~DevFSLinkInode() override;
|
virtual ~DevFSLinkInode() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -131,7 +131,7 @@ class DevFSPtsDirectoryInode final : public DevFSDirectoryInode {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~DevFSPtsDirectoryInode() override;
|
virtual ~DevFSPtsDirectoryInode() override;
|
||||||
virtual String name() const override { return "pts"; };
|
virtual StringView name() const override { return "pts"; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DevFSPtsDirectoryInode(DevFS&);
|
explicit DevFSPtsDirectoryInode(DevFS&);
|
||||||
|
@ -146,7 +146,7 @@ class DevFSRootDirectoryInode final : public DevFSDirectoryInode {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~DevFSRootDirectoryInode() override;
|
virtual ~DevFSRootDirectoryInode() override;
|
||||||
virtual String name() const override { return "."; }
|
virtual StringView name() const override { return "."; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DevFSRootDirectoryInode(DevFS&);
|
explicit DevFSRootDirectoryInode(DevFS&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue