summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2023-05-22 16:27:48 +0000
committerriastradh <riastradh@NetBSD.org>2023-05-22 16:27:48 +0000
commit80fbbf7d5697b81a69b0dfb89d796e2c9fd74a9e (patch)
tree49cb3051ae4f7a51ecd2be88e5a59203028f76ce /sys/dev
parent303d418b2e71d9c68514a99a503939b4c028546f (diff)
efi(4): Move error macros to efi.h.
PR kern/57076 XXX pullup-10
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/efi.c20
-rw-r--r--sys/dev/efi/efi.h18
2 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/efi.c b/sys/dev/efi.c
index 5c80ea4f462..e6bd1b5ab94 100644
--- a/sys/dev/efi.c
+++ b/sys/dev/efi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: efi.c,v 1.5 2023/05/22 16:27:39 riastradh Exp $ */
+/* $NetBSD: efi.c,v 1.6 2023/05/22 16:27:49 riastradh Exp $ */
/*-
* Copyright (c) 2021 Jared McNeill <jmcneill@invisible.ca>
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.5 2023/05/22 16:27:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.6 2023/05/22 16:27:49 riastradh Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -42,22 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.5 2023/05/22 16:27:39 riastradh Exp $");
#include <dev/efivar.h>
-#ifdef _LP64
-#define EFIERR(x) (0x8000000000000000 | (x))
-#else
-#define EFIERR(x) (0x80000000 | (x))
-#endif
-
-#define EFI_SUCCESS 0
-#define EFI_INVALID_PARAMETER EFIERR(2)
-#define EFI_UNSUPPORTED EFIERR(3)
-#define EFI_BUFFER_TOO_SMALL EFIERR(5)
-#define EFI_DEVICE_ERROR EFIERR(7)
-#define EFI_WRITE_PROTECTED EFIERR(8)
-#define EFI_OUT_OF_RESOURCES EFIERR(9)
-#define EFI_NOT_FOUND EFIERR(14)
-#define EFI_SECURITY_VIOLATION EFIERR(26)
-
#include "ioconf.h"
/*
diff --git a/sys/dev/efi/efi.h b/sys/dev/efi/efi.h
index 1f7fe910d06..a88a19cd064 100644
--- a/sys/dev/efi/efi.h
+++ b/sys/dev/efi/efi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: efi.h,v 1.2 2022/09/22 14:46:37 riastradh Exp $ */
+/* $NetBSD: efi.h,v 1.3 2023/05/22 16:27:49 riastradh Exp $ */
/*-
* Copyright (c) 2004 Marcel Moolenaar
@@ -44,6 +44,22 @@
#define EFIAPI /* empty */
#endif
+#ifdef _LP64
+#define EFIERR(x) (0x8000000000000000 | (x))
+#else
+#define EFIERR(x) (0x80000000 | (x))
+#endif
+
+#define EFI_SUCCESS 0
+#define EFI_INVALID_PARAMETER EFIERR(2)
+#define EFI_UNSUPPORTED EFIERR(3)
+#define EFI_BUFFER_TOO_SMALL EFIERR(5)
+#define EFI_DEVICE_ERROR EFIERR(7)
+#define EFI_WRITE_PROTECTED EFIERR(8)
+#define EFI_OUT_OF_RESOURCES EFIERR(9)
+#define EFI_NOT_FOUND EFIERR(14)
+#define EFI_SECURITY_VIOLATION EFIERR(26)
+
enum efi_reset {
EFI_RESET_COLD,
EFI_RESET_WARM,