mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel: Process::cwd_inode() should return a reference.
There's always a current working directory inode.
This commit is contained in:
parent
ce3b548077
commit
f0a869ea50
4 changed files with 23 additions and 36 deletions
|
@ -47,7 +47,7 @@ bool LocalSocket::bind(const sockaddr* address, socklen_t address_size, int& err
|
|||
|
||||
kprintf("%s(%u) LocalSocket{%p} bind(%s)\n", current->name().characters(), current->pid(), this, safe_address);
|
||||
|
||||
m_file = VFS::the().open(safe_address, error, O_CREAT | O_EXCL, S_IFSOCK | 0666, *current->cwd_inode());
|
||||
m_file = VFS::the().open(safe_address, error, O_CREAT | O_EXCL, S_IFSOCK | 0666, current->cwd_inode());
|
||||
if (!m_file) {
|
||||
if (error == -EEXIST)
|
||||
error = -EADDRINUSE;
|
||||
|
@ -80,7 +80,7 @@ bool LocalSocket::connect(const sockaddr* address, socklen_t address_size, int&
|
|||
|
||||
kprintf("%s(%u) LocalSocket{%p} connect(%s)\n", current->name().characters(), current->pid(), this, safe_address);
|
||||
|
||||
m_file = VFS::the().open(safe_address, error, 0, 0, *current->cwd_inode());
|
||||
m_file = VFS::the().open(safe_address, error, 0, 0, current->cwd_inode());
|
||||
if (!m_file) {
|
||||
error = -ECONNREFUSED;
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue