summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/linux.h')
-rw-r--r--src/include/ipxe/linux.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/ipxe/linux.h b/src/include/ipxe/linux.h
index dac508ea6..a01ace3de 100644
--- a/src/include/ipxe/linux.h
+++ b/src/include/ipxe/linux.h
@@ -30,6 +30,14 @@ FILE_LICENCE(GPL2_OR_LATER);
#include <ipxe/device.h>
#include <ipxe/settings.h>
+/**
+ * Convert a Linux error number to an iPXE status code
+ *
+ * @v errno Linux error number
+ * @ret rc iPXE status code (before negation)
+ */
+#define ELINUX( errno ) EPLATFORM ( EINFO_EPLATFORM, errno )
+
/** A linux device */
struct linux_device {
/** Generic device */