diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-01-20 10:28:06 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-01-20 10:28:06 -0800 |
commit | 9cb5eb04bf0700bef1c061261ffbd6dc893eb7e8 (patch) | |
tree | 38a18b559793d00e6ffa43ab0ba8f91b96b8a61d /src/cparse/cparse.ypp | |
parent | 2239b0ff1aa4c9075012021731ed9e2890446911 (diff) | |
download | vyatta-cfg-9cb5eb04bf0700bef1c061261ffbd6dc893eb7e8.tar.gz vyatta-cfg-9cb5eb04bf0700bef1c061261ffbd6dc893eb7e8.zip |
export config output algorithms through shell API
Diffstat (limited to 'src/cparse/cparse.ypp')
-rw-r--r-- | src/cparse/cparse.ypp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cparse/cparse.ypp b/src/cparse/cparse.ypp index b1958e9..aeecaf3 100644 --- a/src/cparse/cparse.ypp +++ b/src/cparse/cparse.ypp @@ -215,3 +215,13 @@ cparse::parse_file(FILE *fin, Cstore& cs) return cur_parent; } +CfgNode * +cparse::parse_file(const char *fname, Cstore& cs) +{ + FILE *fin = fopen(fname, "r"); + if (!fin) { + return NULL; + } + return parse_file(fin, cs); +} + |