From e08d213830f8459f0d0d20d56668d479479a444d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 18 Nov 2021 15:11:31 +0100 Subject: Kernel: Use DistinctNumeric for filesystem ID's This patch adds the FileSystemID type, which is a distinct u32. This prevents accidental conversion from arbitrary integers. --- Kernel/GlobalProcessExposed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kernel/GlobalProcessExposed.cpp') diff --git a/Kernel/GlobalProcessExposed.cpp b/Kernel/GlobalProcessExposed.cpp index 3efb3d3a7c..2bed0a83ae 100644 --- a/Kernel/GlobalProcessExposed.cpp +++ b/Kernel/GlobalProcessExposed.cpp @@ -936,7 +936,7 @@ UNMAP_AFTER_INIT NonnullRefPtr ProcFSRootDirectory::must_cr return directory; } -ErrorOr ProcFSRootDirectory::traverse_as_directory(unsigned fsid, Function(FileSystem::DirectoryEntryView const&)> callback) const +ErrorOr ProcFSRootDirectory::traverse_as_directory(FileSystemID fsid, Function(FileSystem::DirectoryEntryView const&)> callback) const { MutexLocker locker(ProcFSComponentRegistry::the().get_lock()); TRY(callback({ ".", { fsid, component_index() }, 0 })); -- cgit v1.2.3