gmio_core,stl: add new error code GMIO_ERROR_STDIO

This commit is contained in:
Hugues Delorme 2015-05-28 17:31:36 +02:00
parent 62401d5655
commit 304e1c39bb
2 changed files with 8 additions and 2 deletions

View File

@ -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 <stdio.h> function
*
* The caller can check errno to get the real error number
*/
GMIO_ERROR_STDIO,
/*! Unknown error */
GMIO_ERROR_UNKNOWN
};

View File

@ -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;