+// SPDX-License-Identifier: GPL-2.0+
/*
* An inteface for configuring a hardware via u-boot environment.
*
* Copyright 2011 Freescale Semiconductor, Inc.
*
* Author: Anton Vorontsov <avorontsov@ru.mvista.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef HWCONFIG_TEST
"and before environment is ready\n");
return NULL;
}
- env_hwconfig = getenv("hwconfig");
+ env_hwconfig = env_get("hwconfig");
}
if (env_hwconfig) {
const char *ret;
size_t len;
- setenv("hwconfig", "key1:subkey1=value1,subkey2=value2;key2:value3;;;;"
+ env_set("hwconfig", "key1:subkey1=value1,subkey2=value2;key2:value3;;;;"
"key3;:,:=;key4", 1);
ret = hwconfig_arg("key1", &len);
assert(hwconfig_arg("key4", &len) == NULL);
assert(hwconfig_arg("bogus", &len) == NULL);
- unsetenv("hwconfig");
+ unenv_set("hwconfig");
assert(hwconfig(NULL) == 0);
assert(hwconfig("") == 0);