-
Notifications
You must be signed in to change notification settings - Fork 36
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
syscalls: create sys_statvfs syscalls #631
base: master
Are you sure you want to change the base?
Conversation
9ea9d85
to
b22533e
Compare
@@ -23,6 +23,7 @@ | |||
#include "include/posix-poll.h" | |||
#include "include/posix-socket.h" | |||
#include "include/posix-stat.h" | |||
#include "include/posix-statvfs.h" |
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.
Why isn't this file included in the PR?
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.
My bad
posix/posix.h
Outdated
@@ -77,6 +78,9 @@ extern int posix_chmod(const char *path, mode_t mode); | |||
extern int posix_fstat(int fd, struct stat *buf); | |||
|
|||
|
|||
extern int posix_statvfs(const char *path, int fd, struct statvfs *buf); |
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 posix.c, the last argument is called stat
, not buf
posix/posix.c
Outdated
msg.i.attr.type = atMode; | ||
|
||
if ((proc_send(oidp->port, &msg) < 0) || (msg.o.err < 0)) { | ||
(void)posix_fileDeref(f); |
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.
What if f
is used uninitialized? If posix_getOpenFile()
is performed with &f
, then devp == NULL
, so this branch isn't even taken when f
is used.
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.
good catch
b22533e
to
890bf16
Compare
JIRA: RTOS-965
890bf16
to
c213150
Compare
JIRA: RTOS-965
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment
sys: implement fstatvfs libphoenix#397