| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#include <aws/common/environment.h> |
| 6 |
#include <aws/common/file.h> |
| 7 |
#include <aws/common/logging.h> |
| 8 |
#include <aws/common/string.h> |
| 9 |
|
| 10 |
int aws_file_path_read_from_offset_direct_io( |
| 11 |
const struct aws_string *file_path, |
| 12 |
uint64_t offset, |
| 13 |
size_t max_read_length, |
| 14 |
struct aws_byte_buf *output_buf, |
| 15 |
size_t *out_actual_read) { |
| 16 |
(void)file_path; |
| 17 |
(void)offset; |
| 18 |
(void)max_read_length; |
| 19 |
(void)output_buf; |
| 20 |
(void)out_actual_read; |
| 21 |
|
| 22 |
AWS_LOGF_ERROR(AWS_LS_COMMON_GENERAL, "Direct file IO is not supported yet on platforms other than linux."); |
| 23 |
return aws_raise_error(AWS_ERROR_UNSUPPORTED_OPERATION); |
| 24 |
} |
| 25 |
|
| 26 |
int aws_file_path_write_to_offset_direct_io( |
| 27 |
const struct aws_string *file_path, |
| 28 |
uint64_t offset, |
| 29 |
struct aws_byte_cursor data) { |
| 30 |
(void)file_path; |
| 31 |
(void)offset; |
| 32 |
(void)data; |
| 33 |
AWS_LOGF_ERROR(AWS_LS_COMMON_GENERAL, "Direct file IO is not supported yet on platforms other than linux."); |
| 34 |
return aws_raise_error(AWS_ERROR_UNSUPPORTED_OPERATION); |
| 35 |
} |
| 36 |
|
| 37 |
bool aws_file_direct_io_is_supported(void) { |
| 38 |
return false; |
| 39 |
} |