Subversion Repositories Kolibri OS

Rev

Rev 6591 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #include <syscall.h>
  2.  
  3. int write_file(const char *path,const void *buff,
  4.                unsigned offset,unsigned count,unsigned *writes)
  5. {
  6.     ksys70_t k;
  7.     k.p00 = 3;
  8.     k.p04 = offset;
  9.     k.p12 = count;
  10.     k.cbuf16 = buff;
  11.     k.p20 = 0;
  12.     k.p21 = path;
  13.     int status;
  14.     unsigned bytes_written_v;
  15.     FS_Service(&k, &bytes_written_v);
  16.     if (!status){
  17.         *writes = bytes_written_v;
  18.     }
  19.     return status;
  20. }              
  21.