fix syscalls
This commit is contained in:
+8
-8
@@ -77,9 +77,9 @@ int sys_open(const char* filename, int flags)
|
||||
* %0 - file closed
|
||||
* %-EBADFD - bad file descriptor
|
||||
*/
|
||||
int sys_close(int fd)
|
||||
int sys_close(unsigned int fd)
|
||||
{
|
||||
if (fd < 0 || fd >= FDT_MAX) {
|
||||
if (fd >= FDT_MAX) {
|
||||
return -EBADFD;
|
||||
}
|
||||
|
||||
@@ -109,9 +109,9 @@ int sys_close(int fd)
|
||||
* %new_cursor - the new cursor value
|
||||
* On error, a negative value corresponding to an error code is returned.
|
||||
*/
|
||||
int sys_lseek(int fd, int offset, int whence)
|
||||
int sys_lseek(unsigned int fd, int offset, int whence)
|
||||
{
|
||||
if (fd < 0 || fd >= FDT_MAX) {
|
||||
if (fd >= FDT_MAX) {
|
||||
return -EBADFD;
|
||||
}
|
||||
if (!current_process->fdt[fd].open) {
|
||||
@@ -148,9 +148,9 @@ int sys_lseek(int fd, int offset, int whence)
|
||||
* %cursor - cursor position of the file descriptor
|
||||
* On error, a negative value with the corresponding error code is set.
|
||||
*/
|
||||
int sys_tell(int fd)
|
||||
int sys_tell(unsigned int fd)
|
||||
{
|
||||
if (fd < 0 || fd >= FDT_MAX) {
|
||||
if (fd >= FDT_MAX) {
|
||||
return -EBADFD;
|
||||
}
|
||||
if (!current_process->fdt[fd].open) {
|
||||
@@ -171,9 +171,9 @@ int sys_tell(int fd)
|
||||
* %>0 - we are at or past EOF
|
||||
* %0 - not yet (still have bytes to read)
|
||||
*/
|
||||
int sys_eof(int fd)
|
||||
int sys_eof(unsigned int fd)
|
||||
{
|
||||
if (fd < 0 || fd >= FDT_MAX) {
|
||||
if (fd >= FDT_MAX) {
|
||||
return -EBADFD;
|
||||
}
|
||||
if (!current_process->fdt[fd].open) {
|
||||
|
||||
Reference in New Issue
Block a user