git: a7596f6c63e9 - main - snmp_mibII: gc fetching of kern.clockrate
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Jun 2025 17:28:12 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=a7596f6c63e9c7571f2446f82587b9626cab5167
commit a7596f6c63e9c7571f2446f82587b9626cab5167
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-06-17 17:26:30 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-06-17 17:28:00 +0000
snmp_mibII: gc fetching of kern.clockrate
No longer used since df4b9fa460ab.
---
contrib/bsnmp/snmp_mibII/mibII.c | 15 ---------------
contrib/bsnmp/snmp_mibII/mibII.h | 4 ----
2 files changed, 19 deletions(-)
diff --git a/contrib/bsnmp/snmp_mibII/mibII.c b/contrib/bsnmp/snmp_mibII/mibII.c
index 2a4e3756bdc5..59f3836d1ede 100644
--- a/contrib/bsnmp/snmp_mibII/mibII.c
+++ b/contrib/bsnmp/snmp_mibII/mibII.c
@@ -99,9 +99,6 @@ int mib_netsock;
/* last time refreshed */
uint64_t mibarpticks;
-/* info on system clocks */
-struct clockinfo clockinfo;
-
/* list of all New if registrations */
static struct newifreg_list newifreg_list = TAILQ_HEAD_INITIALIZER(newifreg_list);
@@ -1755,20 +1752,8 @@ mibII_start(void)
static int
mibII_init(struct lmodule *mod, int argc __unused, char *argv[] __unused)
{
- size_t len;
-
module = mod;
- len = sizeof(clockinfo);
- if (sysctlbyname("kern.clockrate", &clockinfo, &len, NULL, 0) == -1) {
- syslog(LOG_ERR, "kern.clockrate: %m");
- return (-1);
- }
- if (len != sizeof(clockinfo)) {
- syslog(LOG_ERR, "kern.clockrate: wrong size");
- return (-1);
- }
-
if ((route = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC)) == -1) {
syslog(LOG_ERR, "PF_ROUTE: %m");
return (-1);
diff --git a/contrib/bsnmp/snmp_mibII/mibII.h b/contrib/bsnmp/snmp_mibII/mibII.h
index e84be682d7ae..44e985eb4096 100644
--- a/contrib/bsnmp/snmp_mibII/mibII.h
+++ b/contrib/bsnmp/snmp_mibII/mibII.h
@@ -35,7 +35,6 @@
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/syslog.h>
-#include <sys/time.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -201,9 +200,6 @@ extern int mib_iflist_bad;
/* last time refreshed */
extern uint64_t mibarpticks;
-/* info on system clocks */
-extern struct clockinfo clockinfo;
-
/* baud rate of fastest interface */
extern uint64_t mibif_maxspeed;