WFS: Return a proper ENOENT code on failed OPEN.

This commit is contained in:
Pierre Bourdon 2017-08-07 02:09:31 +02:00
parent 397f5e54e0
commit 1e75455ef5
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ IPCCommandResult WFSSRV::IOCtl(const IOCtlRequest& request)
case IOCTL_WFS_GLOB_NEXT: case IOCTL_WFS_GLOB_NEXT:
INFO_LOG(IOS, "IOCTL_WFS_GLOB_NEXT(%u)", request.request); INFO_LOG(IOS, "IOCTL_WFS_GLOB_NEXT(%u)", request.request);
return_error_code = WFS_EEMPTY; return_error_code = WFS_ENOENT;
break; break;
case IOCTL_WFS_GLOB_END: case IOCTL_WFS_GLOB_END:
@ -149,7 +149,7 @@ IPCCommandResult WFSSRV::IOCtl(const IOCtlRequest& request)
{ {
ERROR_LOG(IOS, "IOCTL_WFS_OPEN(%s, %d): error opening file", path.c_str(), mode); ERROR_LOG(IOS, "IOCTL_WFS_OPEN(%s, %d): error opening file", path.c_str(), mode);
ReleaseFileDescriptor(fd); ReleaseFileDescriptor(fd);
return_error_code = -1; // TODO(wfs): proper error code. return_error_code = WFS_ENOENT;
break; break;
} }

View File

@ -73,7 +73,7 @@ private:
enum enum
{ {
WFS_EBADFD = -10026, // Invalid file descriptor. WFS_EBADFD = -10026, // Invalid file descriptor.
WFS_EEMPTY = -10028, // Directory is empty of iteration completed. WFS_ENOENT = -10028, // No such file or directory.
}; };
struct FileDescriptor struct FileDescriptor