aboutsummaryrefslogtreecommitdiff
path: root/stand/userboot
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-12-06 02:00:00 +0000
committerWarner Losh <imp@FreeBSD.org>2017-12-06 02:00:00 +0000
commite8e6a5f920535a69fceeb071b563b5a0a1eb4024 (patch)
tree3f6cf0bb31d150b0d2e33c9fb3528bce1cc670ea /stand/userboot
parentdb357f584ae0cf56db0d72c0b4a071dcab0dda31 (diff)
downloadsrc-e8e6a5f920535a69fceeb071b563b5a0a1eb4024.tar.gz
src-e8e6a5f920535a69fceeb071b563b5a0a1eb4024.zip
Make putenv and getenv match the userland definition of these
functions, tweak man page and one variable that shouldn't be const anymore. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=326609
Diffstat (limited to 'stand/userboot')
-rw-r--r--stand/userboot/test/test.c4
-rw-r--r--stand/userboot/userboot.h2
-rw-r--r--stand/userboot/userboot/main.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/stand/userboot/test/test.c b/stand/userboot/test/test.c
index 1cee79ce1049..5efe1d3784de 100644
--- a/stand/userboot/test/test.c
+++ b/stand/userboot/test/test.c
@@ -367,10 +367,10 @@ test_getmem(void *arg, uint64_t *lowmem, uint64_t *highmem)
*highmem = 0;
}
-const char *
+char *
test_getenv(void *arg, int idx)
{
- static const char *vars[] = {
+ static char *vars[] = {
"foo=bar",
"bar=barbar",
NULL
diff --git a/stand/userboot/userboot.h b/stand/userboot/userboot.h
index 7ffb06f652aa..2e4a4b4cfcec 100644
--- a/stand/userboot/userboot.h
+++ b/stand/userboot/userboot.h
@@ -202,7 +202,7 @@ struct loader_callbacks {
* environment variable to return next. It will begin at 0 and
* each invocation will add 1 to the previous value of 'num'.
*/
- const char * (*getenv)(void *arg, int num);
+ char * (*getenv)(void *arg, int num);
/*
* Version 4 additions.
diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c
index 9e69724b17a9..7f59eb7c3bdd 100644
--- a/stand/userboot/userboot/main.c
+++ b/stand/userboot/userboot/main.c
@@ -78,7 +78,7 @@ void
loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks)
{
static char mallocbuf[MALLOCSZ];
- const char *var;
+ char *var;
int i;
if (version < USERBOOT_VERSION)