fix: sys write
This commit is contained in:
parent
8fcc6b0ea4
commit
6733fafc29
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
size_t sys_read(int fh, userptr_t buf, size_t size) {
|
size_t sys_read(int fh, userptr_t buf, size_t size) {
|
||||||
int i=0;
|
int i=0;
|
||||||
int * ary = (int*)buf;
|
char * ary = (char*)buf;
|
||||||
if (fh!=STDIN_FILENO) {
|
if (fh!=STDIN_FILENO) {
|
||||||
kprintf("sys_read supported only to stdin\n");
|
kprintf("sys_read supported only to stdin\n");
|
||||||
return -1;
|
return -1;
|
||||||
@ -18,7 +18,7 @@ size_t sys_read(int fh, userptr_t buf, size_t size) {
|
|||||||
|
|
||||||
size_t sys_write(int fh, const userptr_t buf, size_t size) {
|
size_t sys_write(int fh, const userptr_t buf, size_t size) {
|
||||||
int i=0;
|
int i=0;
|
||||||
int * ary = (int*)buf;
|
char * ary = (char*)buf;
|
||||||
|
|
||||||
if (fh!=STDOUT_FILENO && fh!=STDERR_FILENO) {
|
if (fh!=STDOUT_FILENO && fh!=STDERR_FILENO) {
|
||||||
kprintf("sys_write supported only to stdout\n");
|
kprintf("sys_write supported only to stdout\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user