summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/sys/sysctl.h1
-rw-r--r--sys/kern/kern_sysctl.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/include/sys/sysctl.h b/sys/include/sys/sysctl.h
index 0086847..3b8d3c7 100644
--- a/sys/include/sys/sysctl.h
+++ b/sys/include/sys/sysctl.h
@@ -53,6 +53,7 @@
*/
#define HW_PAGESIZE 5
#define HW_NCPU 6
+#define HW_MACHINE 7
/*
* Option types (i.e., int, string, etc) for
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 9b3d301..a4c16bb 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -41,6 +41,7 @@
HYRA_BUILDDATE
static uint32_t pagesize = DEFAULT_PAGESIZE;
+static char machine[] = HYRA_ARCH;
static char hyra[] = "Hyra";
static char hyra_version[] = HYRA_VERSION;
static char osrelease[] = HYRA_RELEASE;
@@ -60,7 +61,8 @@ static struct sysctl_entry common_optab[] = {
/* 'hw.*' */
[HW_PAGESIZE] = { HW_PAGESIZE, SYSCTL_OPTYPE_INT_RO, &pagesize },
- [HW_NCPU] = { HW_NCPU, SYSCTL_OPTYPE_INT, NULL }
+ [HW_NCPU] = { HW_NCPU, SYSCTL_OPTYPE_INT, NULL },
+ [HW_MACHINE] = {HW_MACHINE, SYSCTL_OPTYPE_STR_RO, &machine }
};
static int