aboutsummaryrefslogtreecommitdiff
path: root/linux-user/envlist.h
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-30 19:59:17 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-30 19:59:17 +0000
commit04a6dfebb6b52532a1e0bd637899f1eba14e94c6 (patch)
tree72d4cfb6b675d357c8d6277d600d68c27af9510a /linux-user/envlist.h
parente1ce5e400a08b62100249d9a4f1cc26414c8675e (diff)
linux-user: Add generic env variable handling
Adds support for qemu to modify target process environment variables using -E and -U commandline switches. This replaces eventually the -drop-ld-preload flag. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Riku Voipio <riku.voipio@iki.fi> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6484 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/envlist.h')
-rw-r--r--linux-user/envlist.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/linux-user/envlist.h b/linux-user/envlist.h
new file mode 100644
index 0000000000..e76d4a101b
--- /dev/null
+++ b/linux-user/envlist.h
@@ -0,0 +1,22 @@
+#ifndef ENVLIST_H
+#define ENVLIST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct envlist envlist_t;
+
+extern envlist_t *envlist_create(void);
+extern void envlist_free(envlist_t *);
+extern int envlist_setenv(envlist_t *, const char *);
+extern int envlist_unsetenv(envlist_t *, const char *);
+extern int envlist_parse_set(envlist_t *, const char *);
+extern int envlist_parse_unset(envlist_t *, const char *);
+extern char **envlist_to_environ(const envlist_t *, size_t *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ENVLIST_H */