1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

Kernel: Convert Inode event APIs to use StringViews instead of Strings

These APIs allocate a copy internally anyways, so there's no point to
making another one for them.
This commit is contained in:
Idan Horowitz 2022-01-11 22:04:53 +02:00
parent d1d24eaef4
commit e236f9d85a
4 changed files with 7 additions and 6 deletions

View file

@ -12,6 +12,7 @@
#include <AK/CircularQueue.h>
#include <AK/HashMap.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/String.h>
#include <Kernel/API/InodeWatcherEvent.h>
#include <Kernel/FileSystem/File.h>
#include <Kernel/Forward.h>
@ -54,7 +55,7 @@ public:
virtual StringView class_name() const override { return "InodeWatcher"sv; };
virtual bool is_inode_watcher() const override { return true; }
void notify_inode_event(Badge<Inode>, InodeIdentifier, InodeWatcherEvent::Type, String const& name = {});
void notify_inode_event(Badge<Inode>, InodeIdentifier, InodeWatcherEvent::Type, StringView name = {});
ErrorOr<int> register_inode(Inode&, unsigned event_mask);
ErrorOr<void> unregister_by_wd(int);