diff options
author | David Cantrell <dcantrell@redhat.com> | 2010-07-15 06:10:06 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2010-07-26 21:31:36 -1000 |
commit | ba4e78f1f0bf4b2a5e86f8effbacb2e18e59c2fb (patch) | |
tree | 726c38d49f8eb589aca2261badb69fb43dd81561 /loader/readvars.h | |
parent | 9b91ea48a2f94da3dcf23b59fe305e2190702844 (diff) | |
download | anaconda-ba4e78f1f0bf4b2a5e86f8effbacb2e18e59c2fb.tar.gz anaconda-ba4e78f1f0bf4b2a5e86f8effbacb2e18e59c2fb.tar.xz anaconda-ba4e78f1f0bf4b2a5e86f8effbacb2e18e59c2fb.zip |
Add readvars.c for parsing command line args and shell vars.
Add functions to help simplify parsing of command line arguments as well
as files containing shell-style variables. These functions will parse
strings where values either stand alone or are of the key=value format.
The idea is to reduce the code surrounding /proc/cmdline handling as
well as add in support for easy parsing of files containing shell
variables (e.g., ifcfg files).
Diffstat (limited to 'loader/readvars.h')
-rw-r--r-- | loader/readvars.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/loader/readvars.h b/loader/readvars.h new file mode 100644 index 000000000..8938c04a0 --- /dev/null +++ b/loader/readvars.h @@ -0,0 +1,29 @@ +/* + * readvars.h + * Copyright (C) 2009, 2010 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Author(s): David Cantrell <dcantrell@redhat.com> + */ + +#include <glib.h> + +#ifndef READVARS_H +#define READVARS_H + +GHashTable *readvars_parse_string(gchar *); +GHashTable *readvars_parse_file(gchar *); + +#endif |