git: f20d12595718 - main - devd: Remove gross hack

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 05 Sep 2025 05:52:12 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f20d12595718c56a718d34e1e42cd34a3317121d

commit f20d12595718c56a718d34e1e42cd34a3317121d
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-09-05 04:39:43 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-05 05:52:03 +0000

    devd: Remove gross hack
    
    Remove hack from FreeBSD 14 that mapped kern->kernel for name.
    
    Fixes: 8b4e4c273730
    MFC: Never
    Sponsored by:           Netflix
---
 sbin/devd/devd.cc | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index 1ff405244cde..ee38fbb2ccee 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -1208,27 +1208,6 @@ new_action(const char *cmd)
 eps *
 new_match(const char *var, const char *re)
 {
-	/*
-	 * In FreeBSD 14, we changed the system=kern to system=kernel for the
-	 * resume message to match all the other 'kernel' messages. Generate a
-	 * warning for the life of 14.x that we've 'fixed' the file on the fly,
-	 * but make it a fatal error in 15.x and newer.
-	 */
-	if (strcmp(var, "kern") == 0) {
-#if __FreeBSD_version < 1500000
-		devdlog(LOG_WARNING,
-		    "Changing deprecated system='kern' to new name 'kernel' in %s line %d.",
-		    curr_cf, lineno);
-		free(const_cast<char *>(var));
-		var = strdup("kernel");
-#elif  __FreeBSD_version < 1600000
-		errx(1, "Encountered deprecated system=\"kern\" rule in %s line %d",
-		    curr_cf, lineno);
-#else
-#error "Remove this gross hack"
-#endif
-	}
-
 	eps *e = new match(cfg, var, re);
 	free(const_cast<char *>(var));
 	free(const_cast<char *>(re));