Subversion Repositories Kolibri OS

Rev

Rev 5204 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright (C) KolibriOS team 2004-2024. All rights reserved.
  3.  * Distributed under terms of the GNU General Public License
  4. */
  5.  
  6. #include <sys/types.h>
  7. #include <sys/ksys.h>
  8.  
  9. int read_file(const char *path, void *buff,
  10.                size_t offset, size_t count, size_t *reads)
  11. {
  12.     ksys_file_status_t st = _ksys_file_read(path, offset, count, buff);
  13.     *reads = st.rw_bytes;
  14.     return st.status == KSYS_FS_ERR_EOF ? 0 : st.status;
  15. }
  16.