mirror of
https://github.com/apache/nuttx.git
synced 2025-01-12 22:08:35 +08:00
v9fs/client.c:add check response.nwqid == nwname
Summary: There are differences in different server implementations, so it is necessary to check whether the returned nwqid satisfies the requested number. Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
2ac2d5d511
commit
1f540a93d2
1 changed files with 10 additions and 0 deletions
|
@ -1589,6 +1589,16 @@ int v9fs_client_walk(FAR struct v9fs_client_s *client, FAR const char *path,
|
|||
newfid = ret;
|
||||
}
|
||||
|
||||
/* There are differences in different server implementations, so it is
|
||||
* necessary to check whether the returned nwqid satisfies the requested
|
||||
* number.
|
||||
*/
|
||||
|
||||
if (response.nwqid != nwname)
|
||||
{
|
||||
newfid = -ENOENT;
|
||||
}
|
||||
|
||||
err:
|
||||
lib_put_pathbuffer(request_payload);
|
||||
lib_put_pathbuffer(response_payload);
|
||||
|
|
Loading…
Reference in a new issue