git: e5586b32d2dc - main - exterr: move the definition of user-visible struct uexterror into sys/_uexterror.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Jun 2025 04:07:35 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=e5586b32d2dc5c6112fdc9557c92cd57fc60b0a4
commit e5586b32d2dc5c6112fdc9557c92cd57fc60b0a4
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-05-31 21:39:08 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-06-03 02:43:58 +0000
exterr: move the definition of user-visible struct uexterror into sys/_uexterror.h
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50633
---
sys/sys/_uexterror.h | 27 +++++++++++++++++++++++++++
sys/sys/exterrvar.h | 15 +++------------
2 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/sys/sys/_uexterror.h b/sys/sys/_uexterror.h
new file mode 100644
index 000000000000..2bbeb3e4186f
--- /dev/null
+++ b/sys/sys/_uexterror.h
@@ -0,0 +1,27 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software were developed by Konstantin Belousov <kib@FreeBSD.org>
+ * under sponsorship from the FreeBSD Foundation.
+ */
+
+#ifndef _SYS__UEXTERROR_H_
+#define _SYS__UEXTERROR_H_
+
+#include <sys/_types.h>
+
+struct uexterror {
+ __uint32_t ver;
+ __uint32_t error;
+ __uint32_t cat;
+ __uint32_t src_line;
+ __uint64_t p1;
+ __uint64_t p2;
+ __uint64_t rsrv1[4];
+ char msg[128];
+};
+
+#endif
diff --git a/sys/sys/exterrvar.h b/sys/sys/exterrvar.h
index 3fe2c7446ed1..2fb4c494d158 100644
--- a/sys/sys/exterrvar.h
+++ b/sys/sys/exterrvar.h
@@ -12,19 +12,8 @@
#define _SYS_EXTERRVAR_H_
#include <sys/_exterr.h>
+#include <sys/_uexterror.h>
#include <sys/exterr_cat.h>
-#include <sys/types.h>
-
-struct uexterror {
- uint32_t ver;
- uint32_t error;
- uint32_t cat;
- uint32_t src_line;
- uint64_t p1;
- uint64_t p2;
- uint64_t rsrv1[4];
- char msg[128];
-};
#define UEXTERROR_MAXLEN 256
@@ -66,6 +55,8 @@ int exterr_to_ue(struct thread *td, struct uexterror *ue);
#else /* _KERNEL */
+#include <sys/types.h>
+
__BEGIN_DECLS
int exterrctl(u_int op, u_int flags, void *ptr);
__END_DECLS