mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Kernel: Convert Process-related const member functions to static
Process::get_syscall_path_argument() and ProcFSExposedComponent::modified_time() both are independent of this.
This commit is contained in:
parent
bc29c7f04f
commit
eb1181b898
Notes:
sideshowbarker
2024-07-18 01:06:49 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/eb1181b8986 Pull-request: https://github.com/SerenityOS/serenity/pull/10737 Reviewed-by: https://github.com/BenWiederhake Reviewed-by: https://github.com/PeterBindels-TomTom Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/dascandy Reviewed-by: https://github.com/trflynn89
3 changed files with 5 additions and 5 deletions
|
@ -526,7 +526,7 @@ Custody& Process::current_directory()
|
|||
return *m_cwd;
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<char const*> user_path, size_t path_length) const
|
||||
ErrorOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<char const*> user_path, size_t path_length)
|
||||
{
|
||||
if (path_length == 0)
|
||||
return EINVAL;
|
||||
|
@ -535,7 +535,7 @@ ErrorOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<cha
|
|||
return try_copy_kstring_from_user(user_path, path_length);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const
|
||||
ErrorOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path)
|
||||
{
|
||||
Userspace<char const*> path_characters((FlatPtr)path.characters);
|
||||
return get_syscall_path_argument(path_characters, path.length);
|
||||
|
|
|
@ -546,8 +546,8 @@ private:
|
|||
|
||||
ErrorOr<siginfo_t> do_waitid(Variant<Empty, NonnullRefPtr<Process>, NonnullRefPtr<ProcessGroup>> waitee, int options);
|
||||
|
||||
ErrorOr<NonnullOwnPtr<KString>> get_syscall_path_argument(Userspace<const char*> user_path, size_t path_length) const;
|
||||
ErrorOr<NonnullOwnPtr<KString>> get_syscall_path_argument(const Syscall::StringArgument&) const;
|
||||
static ErrorOr<NonnullOwnPtr<KString>> get_syscall_path_argument(Userspace<const char*> user_path, size_t path_length);
|
||||
static ErrorOr<NonnullOwnPtr<KString>> get_syscall_path_argument(const Syscall::StringArgument&);
|
||||
|
||||
bool has_tracee_thread(ProcessID tracer_pid);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
virtual mode_t required_mode() const { return 0444; }
|
||||
virtual UserID owner_user() const { return 0; }
|
||||
virtual GroupID owner_group() const { return 0; }
|
||||
time_t modified_time() const { return TimeManagement::now().to_timeval().tv_sec; }
|
||||
static time_t modified_time() { return TimeManagement::now().to_timeval().tv_sec; }
|
||||
|
||||
virtual void prepare_for_deletion() { }
|
||||
virtual ErrorOr<void> refresh_data(OpenFileDescription&) const
|
||||
|
|
Loading…
Reference in a new issue