mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 23:14:36 +00:00
Bug 18580 - abidw ignores --out-file
So I forgot to finish the implementation of the --out-file option. This patchlet addresses that. * tools/abidw.cc (main): Take the argument of --out-file into account when emitting the serialized form of the ABI. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
0425b0f566
commit
6c1e7da30d
@ -247,7 +247,22 @@ main(int argc, char* argv[])
|
||||
{
|
||||
if (!opts.write_architecture)
|
||||
corp->set_architecture_name("");
|
||||
abigail::xml_writer::write_corpus_to_native_xml(corp, 0, cout);
|
||||
|
||||
if (!opts.out_file_path.empty())
|
||||
{
|
||||
ofstream of(opts.out_file_path.c_str(), std::ios_base::trunc);
|
||||
if (!of.is_open())
|
||||
{
|
||||
cerr << "could not open output file '"
|
||||
<< opts.out_file_path << "'\n";
|
||||
return 1;
|
||||
}
|
||||
abigail::xml_writer::write_corpus_to_native_xml(corp, 0, of);
|
||||
of.close();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
abigail::xml_writer::write_corpus_to_native_xml(corp, 0, cout);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user