From: David van Moolenbroek Date: Sun, 15 Jan 2017 19:14:00 +0000 (+0000) Subject: Retire env.h X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=5f6c420586374d552d4a81aa129ada5aa46b797d;p=minix.git Retire env.h This was a MINIX3-specific header file placed outside of the minix/ header subdirectory, with its definitions duplicated in the more standard minix/sysutil.h header. Also make env_prefix(3) take constant pointers. Change-Id: I243c38eb38e24eb98f0c0dddf7f340e7fec255f4 --- diff --git a/distrib/sets/lists/minix-comp/mi b/distrib/sets/lists/minix-comp/mi index 16afb47d6..33bdb11d6 100644 --- a/distrib/sets/lists/minix-comp/mi +++ b/distrib/sets/lists/minix-comp/mi @@ -292,7 +292,7 @@ ./usr/include/disktab.h minix-comp ./usr/include/dlfcn.h minix-comp ./usr/include/elf.h minix-comp -./usr/include/env.h minix-comp +./usr/include/env.h minix-comp obsolete ./usr/include/err.h minix-comp ./usr/include/errno.h minix-comp ./usr/include/eti.h minix-comp diff --git a/minix/include/Makefile b/minix/include/Makefile index fbad7bc95..37ab0acc5 100644 --- a/minix/include/Makefile +++ b/minix/include/Makefile @@ -2,7 +2,7 @@ NOOBJ= # defined -INCS+= env.h lib.h libutil.h varargs.h configfile.h +INCS+= lib.h libutil.h varargs.h configfile.h .include diff --git a/minix/include/env.h b/minix/include/env.h deleted file mode 100644 index 2f60f42f0..000000000 --- a/minix/include/env.h +++ /dev/null @@ -1,4 +0,0 @@ -int env_parse(const char *env, const char *fmt, int field, long *param, long min, - long max); -void __dead env_panic(const char *env); -int env_prefix(char *env, char *prefix); diff --git a/minix/include/minix/sysutil.h b/minix/include/minix/sysutil.h index 7ac9fc113..bd976f809 100644 --- a/minix/include/minix/sysutil.h +++ b/minix/include/minix/sysutil.h @@ -36,8 +36,8 @@ extern char **env_argv; void env_setargs(int argc, char *argv[]); int env_get_param(const char *key, char *value, int max_size); -int env_prefix(char *env, char *prefix); -void env_panic(const char *key); +int env_prefix(const char *env, const char *prefix); +void __dead env_panic(const char *key); int env_parse(const char *env, const char *fmt, int field, long *param, long min, long max); diff --git a/minix/lib/libsys/env_panic.c b/minix/lib/libsys/env_panic.c index 6e0c9357f..4ca0dcd42 100644 --- a/minix/lib/libsys/env_panic.c +++ b/minix/lib/libsys/env_panic.c @@ -1,6 +1,5 @@ #include "sysutil.h" #include -#include /*=========================================================================* * env_panic * diff --git a/minix/lib/libsys/env_parse.c b/minix/lib/libsys/env_parse.c index 2cc0b16d9..075c1f16b 100644 --- a/minix/lib/libsys/env_parse.c +++ b/minix/lib/libsys/env_parse.c @@ -1,6 +1,5 @@ #include "sysutil.h" #include -#include #include #include diff --git a/minix/lib/libsys/env_prefix.c b/minix/lib/libsys/env_prefix.c index 5ef297917..e1cf283f7 100644 --- a/minix/lib/libsys/env_prefix.c +++ b/minix/lib/libsys/env_prefix.c @@ -5,11 +5,11 @@ /*=========================================================================* * env_prefix * *=========================================================================*/ -int env_prefix(env, prefix) -char *env; /* environment variable to inspect */ -char *prefix; /* prefix to test for */ +int env_prefix(const char *env, const char *prefix) { /* An environment setting may be prefixed by a word, usually "pci". + * - env: environment variable to inspect + * - prefix: prefix to test for * Return TRUE if a given prefix is used. */ char value[EP_BUF_SIZE]; diff --git a/minix/servers/pm/main.c b/minix/servers/pm/main.c index bee852f1d..825c8abba 100644 --- a/minix/servers/pm/main.c +++ b/minix/servers/pm/main.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include "mproc.h" diff --git a/minix/servers/vm/break.c b/minix/servers/vm/break.c index 92c0eee7d..57478f62f 100644 --- a/minix/servers/vm/break.c +++ b/minix/servers/vm/break.c @@ -29,7 +29,6 @@ #include #include -#include #include "glo.h" #include "vm.h" diff --git a/minix/servers/vm/exit.c b/minix/servers/vm/exit.c index dd0ee6d63..58c3c2576 100644 --- a/minix/servers/vm/exit.c +++ b/minix/servers/vm/exit.c @@ -16,7 +16,6 @@ #include #include -#include #include "glo.h" #include "proto.h" diff --git a/minix/servers/vm/fork.c b/minix/servers/vm/fork.c index 806fe38a9..3b399932c 100644 --- a/minix/servers/vm/fork.c +++ b/minix/servers/vm/fork.c @@ -17,7 +17,6 @@ #include #include -#include #include #include "glo.h" diff --git a/minix/servers/vm/main.c b/minix/servers/vm/main.c index d6f5d7b55..7cd817d02 100644 --- a/minix/servers/vm/main.c +++ b/minix/servers/vm/main.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/minix/servers/vm/mmap.c b/minix/servers/vm/mmap.c index 8c472a141..b1394a29e 100644 --- a/minix/servers/vm/mmap.c +++ b/minix/servers/vm/mmap.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/minix/servers/vm/pagefaults.c b/minix/servers/vm/pagefaults.c index 23e122f4f..e851683d7 100644 --- a/minix/servers/vm/pagefaults.c +++ b/minix/servers/vm/pagefaults.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/minix/servers/vm/pagetable.c b/minix/servers/vm/pagetable.c index 695656cb2..f7f6101b2 100644 --- a/minix/servers/vm/pagetable.c +++ b/minix/servers/vm/pagetable.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/minix/servers/vm/rs.c b/minix/servers/vm/rs.c index 9f7298cb5..9801a39e7 100644 --- a/minix/servers/vm/rs.c +++ b/minix/servers/vm/rs.c @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/minix/servers/vm/slaballoc.c b/minix/servers/vm/slaballoc.c index a208548c1..0466856fc 100644 --- a/minix/servers/vm/slaballoc.c +++ b/minix/servers/vm/slaballoc.c @@ -18,7 +18,6 @@ #include #include #include -#include #include diff --git a/minix/servers/vm/utility.c b/minix/servers/vm/utility.c index 4a1068891..189c35549 100644 --- a/minix/servers/vm/utility.c +++ b/minix/servers/vm/utility.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/minix/servers/vm/vfs.c b/minix/servers/vm/vfs.c index c7ab5e7cf..98488f933 100644 --- a/minix/servers/vm/vfs.c +++ b/minix/servers/vm/vfs.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include