diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-14 13:39:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-30 10:24:12 +0100 |
commit | 87feda4eb17229ec10dbc919cf3ee3d39959037b (patch) | |
tree | b23819854709bdcb943a2651bb59868e2d4f6ad4 /include/environment.h | |
parent | 19bd0bc9dbe40e4953adeabd3efa2846489b1700 (diff) | |
download | barebox-87feda4eb17229ec10dbc919cf3ee3d39959037b.tar.gz barebox-87feda4eb17229ec10dbc919cf3ee3d39959037b.tar.xz |
environment variables: use linux list
This switches environment variables to use linux list. This is easier
to read. An additional plus is that the environment variables no longer
need an initcall, so malloc is the only requirement for them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/environment.h')
-rw-r--r-- | include/environment.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/environment.h b/include/environment.h index 5cd7ecfee0..fd7735ae74 100644 --- a/include/environment.h +++ b/include/environment.h @@ -26,14 +26,15 @@ * Managment of a environment variable */ struct variable_d { - struct variable_d *next; /**< List management */ - char data[0]; /**< variable length data */ + struct list_head list; + char *name; + char *data; }; struct env_context { - struct env_context *parent; /**< FIXME */ - struct variable_d *local; /**< FIXME */ - struct variable_d *global; /**< FIXME */ + struct env_context *parent; + struct list_head local; + struct list_head global; }; struct env_context *get_current_context(void); |