kolibrios-gitea/drivers/ddk/io/write.c
turbocat be90c91c89 ddk:
- Fixed Makefile
- Added FS_Service instead of calling system call 70

git-svn-id: svn://kolibrios.org@9057 a494cfbc-eb01-0410-851d-a64ba20cac60
2021-07-12 22:49:51 +00:00

21 lines
461 B
C

#include <syscall.h>
int write_file(const char *path,const void *buff,
unsigned offset,unsigned count,unsigned *writes)
{
ksys70_t k;
k.p00 = 3;
k.p04 = offset;
k.p12 = count;
k.cbuf16 = buff;
k.p20 = 0;
k.p21 = path;
int status;
unsigned bytes_written_v;
FS_Service(&k, &bytes_written_v);
if (!status){
*writes = bytes_written_v;
}
return status;
}