git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ld-tool portability fix: MacOS build experience
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
vfs.c
diff --git
a/lunaix-os/kernel/fs/vfs.c
b/lunaix-os/kernel/fs/vfs.c
index 28cede5e5a2ad44e2dc90487acb3dad79c98e93e..eb4239639e84082ff89f13effb20da6a4e00e054 100644
(file)
--- a/
lunaix-os/kernel/fs/vfs.c
+++ b/
lunaix-os/kernel/fs/vfs.c
@@
-47,7
+47,6
@@
#include <lunaix/foptions.h>
#include <lunaix/fs.h>
#include <lunaix/mm/cake.h>
#include <lunaix/foptions.h>
#include <lunaix/fs.h>
#include <lunaix/mm/cake.h>
-#include <lunaix/mm/page.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/process.h>
#include <lunaix/spike.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/process.h>
#include <lunaix/spike.h>
@@
-708,7
+707,7
@@
__DEFINE_LXSYSCALL3(int, read, int, fd, void*, buf, size_t, count)
file->inode->atime = clock_unixtime();
if ((file->inode->itype & VFS_IFSEQDEV) || (fd_s->flags & FO_DIRECT)) {
file->inode->atime = clock_unixtime();
if ((file->inode->itype & VFS_IFSEQDEV) || (fd_s->flags & FO_DIRECT)) {
- errno = file->ops->read(file->inode, buf, count, file->f_pos);
+
errno = file->ops->read(file->inode, buf, count, file->f_pos);
} else {
errno = pcache_read(file->inode, buf, count, file->f_pos);
}
} else {
errno = pcache_read(file->inode, buf, count, file->f_pos);
}
@@
-1337,7
+1336,7
@@
__DEFINE_LXSYSCALL2(char*, getcwd, char*, buf, size_t, size)
ret_ptr = buf;
done:
ret_ptr = buf;
done:
-
__current->k_status = errno
;
+
syscall_result(errno)
;
return ret_ptr;
}
return ret_ptr;
}
@@
-1454,7
+1453,7
@@
__DEFINE_LXSYSCALL2(int, fstat, int, fd, struct file_stat*, stat)
.st_blocks = vino->lb_usage,
.st_size = vino->fsize,
.mode = vino->itype,
.st_blocks = vino->lb_usage,
.st_size = vino->fsize,
.mode = vino->itype,
- .st_ioblksize = P
G
_SIZE,
+ .st_ioblksize = P
AGE
_SIZE,
.st_blksize = vino->sb->blksize};
if (VFS_DEVFILE(vino->itype)) {
.st_blksize = vino->sb->blksize};
if (VFS_DEVFILE(vino->itype)) {