mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix userfs bugs return values and bugs.
This commit is contained in:
parent
5c0c479347
commit
66f1a62743
1 changed files with 6 additions and 6 deletions
|
@ -353,7 +353,7 @@ void ChannelDirection::SendClose()
|
||||||
void ChannelDirection::RecvClose()
|
void ChannelDirection::RecvClose()
|
||||||
{
|
{
|
||||||
ScopedLock lock(&transfer_lock);
|
ScopedLock lock(&transfer_lock);
|
||||||
still_writing = false;
|
still_reading = false;
|
||||||
kthread_cond_signal(¬_full);
|
kthread_cond_signal(¬_full);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1002,7 +1002,7 @@ int Unode::mkdir(ioctx_t* /*ctx*/, const char* filename, mode_t mode)
|
||||||
{
|
{
|
||||||
Channel* channel = server->Connect();
|
Channel* channel = server->Connect();
|
||||||
if ( !channel )
|
if ( !channel )
|
||||||
return 0;
|
return -1;
|
||||||
size_t filenamelen = strlen(filename);
|
size_t filenamelen = strlen(filename);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct fsm_req_mkdir msg;
|
struct fsm_req_mkdir msg;
|
||||||
|
@ -1024,7 +1024,7 @@ int Unode::link(ioctx_t* /*ctx*/, const char* filename, Ref<Inode> node)
|
||||||
return errno = EXDEV, -1;
|
return errno = EXDEV, -1;
|
||||||
Channel* channel = server->Connect();
|
Channel* channel = server->Connect();
|
||||||
if ( !channel )
|
if ( !channel )
|
||||||
return 0;
|
return -1;
|
||||||
size_t filenamelen = strlen(filename);
|
size_t filenamelen = strlen(filename);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct fsm_req_link msg;
|
struct fsm_req_link msg;
|
||||||
|
@ -1049,7 +1049,7 @@ int Unode::unlink(ioctx_t* /*ctx*/, const char* filename)
|
||||||
// TODO: Make sure the target is no longer used!
|
// TODO: Make sure the target is no longer used!
|
||||||
Channel* channel = server->Connect();
|
Channel* channel = server->Connect();
|
||||||
if ( !channel )
|
if ( !channel )
|
||||||
return 0;
|
return -1;
|
||||||
size_t filenamelen = strlen(filename);
|
size_t filenamelen = strlen(filename);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct fsm_req_unlink msg;
|
struct fsm_req_unlink msg;
|
||||||
|
@ -1073,7 +1073,7 @@ int Unode::rmdir(ioctx_t* /*ctx*/, const char* filename)
|
||||||
// TODO: Make sure the target is no longer used!
|
// TODO: Make sure the target is no longer used!
|
||||||
Channel* channel = server->Connect();
|
Channel* channel = server->Connect();
|
||||||
if ( !channel )
|
if ( !channel )
|
||||||
return 0;
|
return -1;
|
||||||
size_t filenamelen = strlen(filename);
|
size_t filenamelen = strlen(filename);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
struct fsm_req_rmdir msg;
|
struct fsm_req_rmdir msg;
|
||||||
|
@ -1096,7 +1096,7 @@ int Unode::symlink(ioctx_t* /*ctx*/, const char* oldname, const char* filename)
|
||||||
{
|
{
|
||||||
Channel* channel = server->Connect();
|
Channel* channel = server->Connect();
|
||||||
if ( !channel )
|
if ( !channel )
|
||||||
return 0;
|
return -1;
|
||||||
size_t oldnamelen = strlen(oldname);
|
size_t oldnamelen = strlen(oldname);
|
||||||
size_t filenamelen = strlen(filename);
|
size_t filenamelen = strlen(filename);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
Loading…
Reference in a new issue