summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/Process.cpp2
-rw-r--r--Kernel/VirtualFileSystem.cpp6
-rw-r--r--Kernel/VirtualFileSystem.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 6c5745530c..f0898e531f 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -1869,7 +1869,7 @@ int Process::sys$mkdir(const char* pathname, mode_t mode)
if (pathname_length >= 255)
return -ENAMETOOLONG;
int error;
- if (!VFS::the().mkdir(String(pathname, pathname_length), mode, cwd_inode()->identifier(), error))
+ if (!VFS::the().mkdir(String(pathname, pathname_length), mode, *cwd_inode(), error))
return error;
return 0;
}
diff --git a/Kernel/VirtualFileSystem.cpp b/Kernel/VirtualFileSystem.cpp
index 44960bc228..4d78912665 100644
--- a/Kernel/VirtualFileSystem.cpp
+++ b/Kernel/VirtualFileSystem.cpp
@@ -198,7 +198,7 @@ RetainPtr<FileDescriptor> VFS::create(const String& path, int& error, int option
return FileDescriptor::create(move(new_file));
}
-bool VFS::mkdir(const String& path, mode_t mode, InodeIdentifier base, int& error)
+bool VFS::mkdir(const String& path, mode_t mode, Inode& base, int& error)
{
error = -EWHYTHO;
// FIXME: This won't work nicely across mount boundaries.
@@ -209,7 +209,7 @@ bool VFS::mkdir(const String& path, mode_t mode, InodeIdentifier base, int& erro
}
InodeIdentifier parent_dir;
- auto existing_dir = resolve_path(path, base, error, 0, &parent_dir);
+ auto existing_dir = resolve_path(path, base.identifier(), error, 0, &parent_dir);
if (existing_dir.is_valid()) {
error = -EEXIST;
return false;
@@ -222,7 +222,7 @@ bool VFS::mkdir(const String& path, mode_t mode, InodeIdentifier base, int& erro
return false;
}
dbgprintf("VFS::mkdir: '%s' in %u:%u\n", p.basename().characters(), parent_dir.fsid(), parent_dir.index());
- auto new_dir = base.fs()->create_directory(parent_dir, p.basename(), mode, error);
+ auto new_dir = parent_dir.fs()->create_directory(parent_dir, p.basename(), mode, error);
if (new_dir) {
error = 0;
return true;
diff --git a/Kernel/VirtualFileSystem.h b/Kernel/VirtualFileSystem.h
index a647daeac0..0ef4995857 100644
--- a/Kernel/VirtualFileSystem.h
+++ b/Kernel/VirtualFileSystem.h
@@ -67,7 +67,7 @@ public:
RetainPtr<FileDescriptor> open(RetainPtr<CharacterDevice>&&, int& error, int options);
RetainPtr<FileDescriptor> open(const String& path, int& error, int options, mode_t mode, InodeIdentifier base = InodeIdentifier());
RetainPtr<FileDescriptor> create(const String& path, int& error, int options, mode_t mode, InodeIdentifier base);
- bool mkdir(const String& path, mode_t mode, InodeIdentifier base, int& error);
+ bool mkdir(const String& path, mode_t mode, Inode& base, int& error);
bool unlink(const String& path, Inode& base, int& error);
bool rmdir(const String& path, Inode& base, int& error);
bool chmod(const String& path, mode_t, Inode& base, int& error);