-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to support WASI on Zephyr #3948
base: dev/zephyr_file_socket
Are you sure you want to change the base?
Fixes to support WASI on Zephyr #3948
Conversation
Fixed issues in os_renameat Signed-off-by: Stephen Berard <[email protected]>
There is 1 testing failing above, but I don't believe it's related to this PR. |
It's not related. Don't be worried. |
|
||
char *path = strdup(new_path); | ||
if (path == NULL) { | ||
return __WASI_ENOMEM; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In before, if strdup()
returns NULL, ptr->path
will be set to old_path
instead of maintaining original value. But in after, it's not. So, is it on purpose?
return __WASI_ENOMEM; | ||
} | ||
|
||
free(ptr->path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to be sure, IIUC, the core idea of this patch is to free(ptr->path)
before assigning a new value. Is that correct?
* To manage our file descriptors, we created a struct `zephyr_fs_desc` that | ||
* represent a zephyr file descriptor and hold useful informations. | ||
* We also created a file descriptor table to keep track of all the file | ||
* To manage our file descriptors, we a struct `zephyr_fs_desc` is created that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had better remove we
?
Fixed issues #3311.
@wenyongh I'm merging this to the branch created so that we can review and ensure all the items are addressed prior to merging back to main.