Rev 6330 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9952 | turbocat | 1 | /* |
2 | * Copyright (C) KolibriOS team 2004-2024. All rights reserved. |
||
3 | * Distributed under terms of the GNU General Public License |
||
4 | */ |
||
5 | |||
4921 | Serge | 6 | #include |
6330 | serge | 7 | #include |
9952 | turbocat | 8 | #include |
4921 | Serge | 9 | |
9952 | turbocat | 10 | int write_file(const char *path, const void *buff, |
4921 | Serge | 11 | size_t offset, size_t count, size_t *writes) |
12 | { |
||
9952 | turbocat | 13 | ksys_file_status_t st = _ksys_file_write(path, offset, count, buff); |
14 | *writes = st.rw_bytes; |
||
15 | if(!st.status) |
||
6330 | serge | 16 | return 0; |
9952 | turbocat | 17 | else if (st.status == KSYS_FS_ERR_8) |
6330 | serge | 18 | return ENOSPC; |
19 | return -1; |
||
9952 | turbocat | 20 | } |