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
This commit is contained in:
David van Moolenbroek 2017-01-15 19:14:00 +00:00
parent 40dec70c39
commit 5f6c420586
19 changed files with 7 additions and 25 deletions

View File

@ -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

View File

@ -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 <bsd.own.mk>

View File

@ -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);

View File

@ -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);

View File

@ -1,6 +1,5 @@
#include "sysutil.h"
#include <string.h>
#include <env.h>
/*=========================================================================*
* env_panic *

View File

@ -1,6 +1,5 @@
#include "sysutil.h"
#include <stdlib.h>
#include <env.h>
#include <string.h>
#include <minix/param.h>

View File

@ -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];

View File

@ -25,7 +25,6 @@
#include <sys/utsname.h>
#include <sys/wait.h>
#include <machine/archtypes.h>
#include <env.h>
#include <assert.h>
#include "mproc.h"

View File

@ -29,7 +29,6 @@
#include <minix/bitmap.h>
#include <errno.h>
#include <env.h>
#include "glo.h"
#include "vm.h"

View File

@ -16,7 +16,6 @@
#include <errno.h>
#include <assert.h>
#include <env.h>
#include "glo.h"
#include "proto.h"

View File

@ -17,7 +17,6 @@
#include <string.h>
#include <errno.h>
#include <env.h>
#include <assert.h>
#include "glo.h"

View File

@ -23,7 +23,6 @@
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <env.h>
#include <stdio.h>
#include <assert.h>

View File

@ -24,7 +24,6 @@
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <env.h>
#include <stdio.h>
#include <fcntl.h>

View File

@ -20,7 +20,6 @@
#include <errno.h>
#include <string.h>
#include <env.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>

View File

@ -21,7 +21,6 @@
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <env.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>

View File

@ -20,7 +20,6 @@
#include <errno.h>
#include <string.h>
#include <env.h>
#include <stdio.h>
#include <assert.h>

View File

@ -18,7 +18,6 @@
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <env.h>
#include <sys/param.h>

View File

@ -19,7 +19,6 @@
#include <minix/rs.h>
#include <string.h>
#include <errno.h>
#include <env.h>
#include <unistd.h>
#include <assert.h>
#include <sys/cdefs.h>

View File

@ -18,7 +18,6 @@
#include <minix/bitmap.h>
#include <string.h>
#include <errno.h>
#include <env.h>
#include <unistd.h>
#include <assert.h>
#include <sys/param.h>