summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drivers/io/io_storage.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/drivers/io/io_storage.h b/include/drivers/io/io_storage.h
index e98dcd04..4c3526ef 100644
--- a/include/drivers/io/io_storage.h
+++ b/include/drivers/io/io_storage.h
@@ -31,6 +31,7 @@
#ifndef __IO_H__
#define __IO_H__
+#include <errno.h>
#include <stdint.h>
#include <stdio.h> /* For ssize_t */
#include <uuid.h>
@@ -88,11 +89,13 @@ typedef struct io_block_spec {
#define IO_MODE_RW (1 << 1)
-/* Return codes reported by 'io_*' APIs */
+/* Return codes reported by 'io_*' APIs.
+ * IMPORTANT: these definitions are deprecated. Callers should use standard
+ * errno definitions when checking the return value of io_* APIs. */
#define IO_SUCCESS (0)
-#define IO_FAIL (-1)
-#define IO_NOT_SUPPORTED (-2)
-#define IO_RESOURCES_EXHAUSTED (-3)
+#define IO_FAIL (-ENOENT)
+#define IO_NOT_SUPPORTED (-ENODEV)
+#define IO_RESOURCES_EXHAUSTED (-ENOMEM)
/* Open a connection to a device */