9b3ecb114d
Parse ``<env key="..." value=".."/>`` nodes from the config ROM and populate a list at the 'genode_envp' and 'environ' symbols. Test script at run/libc_getenv. Fix #2236
27 lines
475 B
C
27 lines
475 B
C
/*
|
|
* \brief Libc getenv(...) test
|
|
* \author Emery Hemingway
|
|
* \date 2017-01-24
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2017 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int i;
|
|
for (i = 1; i < argc; ++i) {
|
|
char const *key = argv[i];
|
|
printf("%s=\"%s\"\n", key, getenv(key));
|
|
}
|
|
|
|
return 0;
|
|
}
|