Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2014 17:34:05 +0000 (UTC)
From:      Davide Italiano <davide@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273234 - in head/sys: dev/cfe dev/nvram2env mips/beri mips/rmi mips/rt305x
Message-ID:  <201410171734.s9HHY53a072663@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davide
Date: Fri Oct 17 17:34:05 2014
New Revision: 273234
URL: https://svnweb.freebsd.org/changeset/base/273234

Log:
  Convert remaining {g,s}etenv->kern_{g,s}etenv
  left over from r273174.
  
  Reported by:    bz

Modified:
  head/sys/dev/cfe/cfe_env.c
  head/sys/dev/nvram2env/nvram2env.c
  head/sys/mips/beri/beri_machdep.c
  head/sys/mips/rmi/xlr_machdep.c
  head/sys/mips/rt305x/rt305x_machdep.c

Modified: head/sys/dev/cfe/cfe_env.c
==============================================================================
--- head/sys/dev/cfe/cfe_env.c	Fri Oct 17 16:32:27 2014	(r273233)
+++ head/sys/dev/cfe/cfe_env.c	Fri Oct 17 17:34:05 2014	(r273234)
@@ -52,7 +52,7 @@ cfe_env_init(void)
 		if (cfe_enumenv(idx, name, sizeof(name), val, sizeof(val)) != 0)
 			break;
 
-		if (setenv(name, val) != 0) {
+		if (kern_setenv(name, val) != 0) {
 			printf("No space to store CFE env: \"%s=%s\"\n",
 				name, val);
 		}

Modified: head/sys/dev/nvram2env/nvram2env.c
==============================================================================
--- head/sys/dev/nvram2env/nvram2env.c	Fri Oct 17 16:32:27 2014	(r273233)
+++ head/sys/dev/nvram2env/nvram2env.c	Fri Oct 17 17:34:05 2014	(r273234)
@@ -263,7 +263,7 @@ nvram2env_attach(device_t dev)
 				if (bootverbose)
 					printf("ENV: %s=%s\n", pair, value);
 #endif
-				setenv(pair, value);
+				kern_setenv(pair, value);
 
 				if (strcasecmp(pair, "WAN_MAC_ADDR") == 0) {
 					/* Alias for MAC address of eth0 */
@@ -271,7 +271,7 @@ nvram2env_attach(device_t dev)
 						printf("ENV: aliasing "
 						    "WAN_MAC_ADDR to ethaddr"
 						    " = %s\n",  value);
-					setenv("ethaddr", value);
+					kern_setenv("ethaddr", value);
 				}
 				else if (strcasecmp(pair, "LAN_MAC_ADDR") == 0){
 					/* Alias for MAC address of eth1 */
@@ -279,7 +279,7 @@ nvram2env_attach(device_t dev)
 						printf("ENV: aliasing "
 						    "LAN_MAC_ADDR to eth1addr"
 						    " = %s\n",  value);
-					setenv("eth1addr", value);
+					kern_setenv("eth1addr", value);
 				}
 
 				if (strcmp(pair, "bootverbose") == 0)

Modified: head/sys/mips/beri/beri_machdep.c
==============================================================================
--- head/sys/mips/beri/beri_machdep.c	Fri Oct 17 16:32:27 2014	(r273233)
+++ head/sys/mips/beri/beri_machdep.c	Fri Oct 17 17:34:05 2014	(r273234)
@@ -164,9 +164,9 @@ _parse_bootargs(char *cmdline)
 		} else {
 			n = strsep(&v, "=");
 			if (v == NULL)
-				setenv(n, "1");
+				kern_setenv(n, "1");
 			else
-				setenv(n, v);
+				kern_setenv(n, v);
 		}
 	}
 }

Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c	Fri Oct 17 16:32:27 2014	(r273233)
+++ head/sys/mips/rmi/xlr_machdep.c	Fri Oct 17 17:34:05 2014	(r273234)
@@ -458,9 +458,9 @@ platform_start(__register_t a0 __unused,
 		printf("\t%s\n", arg);
 		n = strsep(&arg, "=");
 		if (arg == NULL)
-			setenv(n, "1");
+			kern_setenv(n, "1");
 		else
-			setenv(n, arg);
+			kern_setenv(n, arg);
 	}
 
 	xlr_set_boot_flags();

Modified: head/sys/mips/rt305x/rt305x_machdep.c
==============================================================================
--- head/sys/mips/rt305x/rt305x_machdep.c	Fri Oct 17 16:32:27 2014	(r273233)
+++ head/sys/mips/rt305x/rt305x_machdep.c	Fri Oct 17 17:34:05 2014	(r273234)
@@ -167,7 +167,7 @@ platform_start(__register_t a0 __unused,
 			arg = (char *)(intptr_t)MIPS_PHYS_TO_KSEG0(argv[i]);
 			printf("\targv[%d] = %s\n", i, arg);
 			sprintf(n, "argv%d", i);
-			setenv(n, arg);
+			kern_setenv(n, arg);
 		}
 	}
 
@@ -180,9 +180,9 @@ platform_start(__register_t a0 __unused,
 		printf("\t%s\n", arg);
 		n = strsep(&arg, "=");
 		if (arg == NULL)
-			setenv(n, "1");
+			kern_setenv(n, "1");
 		else
-			setenv(n, arg);
+			kern_setenv(n, arg);
 	}
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410171734.s9HHY53a072663>