Re: svn commit: r366508 - in head/sys: dev/rt geom/eli kern sys

2020-10-07 Thread Kyle Evans
On Wed, Oct 7, 2020 at 1:16 AM Warner Losh  wrote:
>
> Author: imp
> Date: Wed Oct  7 06:16:37 2020
> New Revision: 366508
> URL: https://svnweb.freebsd.org/changeset/base/366508
>
> Log:
>   Move kernel env global variables, etc to sys/kenv.h
>
>   The kernel globals for kenv are confined to 2 files that need them and
>   a few that likely shouldn't (but as written the code does). Move them
>   from sys/systm.h to sys/kenv.h. This removed a XXX from systm.h and
>   cleans it up a little bit...
>

https://reviews.freebsd.org/D26562 can be closed now
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r366508 - in head/sys: dev/rt geom/eli kern sys

2020-10-07 Thread Warner Losh
Author: imp
Date: Wed Oct  7 06:16:37 2020
New Revision: 366508
URL: https://svnweb.freebsd.org/changeset/base/366508

Log:
  Move kernel env global variables, etc to sys/kenv.h
  
  The kernel globals for kenv are confined to 2 files that need them and
  a few that likely shouldn't (but as written the code does). Move them
  from sys/systm.h to sys/kenv.h. This removed a XXX from systm.h and
  cleans it up a little bit...

Modified:
  head/sys/dev/rt/if_rt.c
  head/sys/geom/eli/g_eli.c
  head/sys/kern/kern_environment.c
  head/sys/kern/subr_hints.c
  head/sys/sys/kenv.h
  head/sys/sys/systm.h

Modified: head/sys/dev/rt/if_rt.c
==
--- head/sys/dev/rt/if_rt.c Wed Oct  7 05:44:35 2020(r366507)
+++ head/sys/dev/rt/if_rt.c Wed Oct  7 06:16:37 2020(r366508)
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
 #include "if_rtvar.h"
 #include "if_rtreg.h"
 
+#include 
+
 #include 
 #include 
 #include 

Modified: head/sys/geom/eli/g_eli.c
==
--- head/sys/geom/eli/g_eli.c   Wed Oct  7 05:44:35 2020(r366507)
+++ head/sys/geom/eli/g_eli.c   Wed Oct  7 06:16:37 2020(r366508)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/kern/kern_environment.c
==
--- head/sys/kern/kern_environment.cWed Oct  7 05:44:35 2020
(r366507)
+++ head/sys/kern/kern_environment.cWed Oct  7 06:16:37 2020
(r366508)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/kern/subr_hints.c
==
--- head/sys/kern/subr_hints.c  Wed Oct  7 05:44:35 2020(r366507)
+++ head/sys/kern/subr_hints.c  Wed Oct  7 06:16:37 2020(r366508)
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/sys/kenv.h
==
--- head/sys/sys/kenv.h Wed Oct  7 05:44:35 2020(r366507)
+++ head/sys/sys/kenv.h Wed Oct  7 06:16:37 2020(r366508)
@@ -42,4 +42,18 @@
 #define KENV_MNAMELEN  128 /* Maximum name length (for the syscall) */
 #define KENV_MVALLEN   128 /* Maximum value length (for the syscall) */
 
+#ifdef _KERNEL
+/*
+ * Most of these variables should be const.
+ */
+extern bool dynamic_kenv;
+extern struct mtx kenv_lock;
+extern char *kern_envp;
+extern char *md_envp;
+extern char static_env[];
+extern char static_hints[];/* by config for now */
+
+extern char **kenvp;
+#endif /* _KERNEL */
+
 #endif /* !_SYS_KENV_H_ */

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hWed Oct  7 05:44:35 2020(r366507)
+++ head/sys/sys/systm.hWed Oct  7 06:16:37 2020(r366508)
@@ -204,21 +204,7 @@ void   kassert_panic(const char *fmt, ...)  
__printflike
 })
 #defineSCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread)
 
-/*
- * XXX the hints declarations are even more misplaced than most declarations
- * in this file, since they are needed in one file (per arch) and only used
- * in two files.
- * XXX most of these variables should be const.
- */
 extern int osreldate;
-extern bool dynamic_kenv;
-extern struct mtx kenv_lock;
-extern char *kern_envp;
-extern char *md_envp;
-extern char static_env[];
-extern char static_hints[];/* by config for now */
-
-extern char **kenvp;
 
 extern const void *zero_region;/* address space maps to a zeroed page  
*/
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"