diff --git a/src/gmio_core/error.h b/src/gmio_core/error.h index eba71b7..73c5002 100644 --- a/src/gmio_core/error.h +++ b/src/gmio_core/error.h @@ -44,6 +44,12 @@ enum gmio_error * gmio_transfer::is_stop_requested_func() returned GMIO_TRUE */ GMIO_ERROR_TRANSFER_STOPPED, + /*! An error occured after a call to a function + * + * The caller can check errno to get the real error number + */ + GMIO_ERROR_STDIO, + /*! Unknown error */ GMIO_ERROR_UNKNOWN }; diff --git a/src/gmio_stl/stl_io.c b/src/gmio_stl/stl_io.c index 1bdc609..c053822 100644 --- a/src/gmio_stl/stl_io.c +++ b/src/gmio_stl/stl_io.c @@ -46,7 +46,7 @@ int gmio_stl_read_file( gmio_buffer_deallocate(&trsf.buffer); } else { - error = GMIO_ERROR_UNKNOWN; + error = GMIO_ERROR_STDIO; } return error; @@ -107,7 +107,7 @@ int gmio_stl_write_file( gmio_buffer_deallocate(&trsf.buffer); } else { - error = GMIO_ERROR_UNKNOWN; + error = GMIO_ERROR_STDIO; } return error;