diff options
author | James Bowes <jbowes@redhat.com> | 2008-06-26 17:16:13 -0400 |
---|---|---|
committer | James Bowes <jbowes@redhat.com> | 2008-06-26 17:16:13 -0400 |
commit | c57370decf4e204cf4e3323e669cc676a2760707 (patch) | |
tree | 6272c18f292a42f18223c71dd201caa497b4b098 /src/main.c | |
parent | 436386fb11ee56e50c2c76c496b1f6c39530e170 (diff) |
Add return codes to razor_set_open_files and open_details
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -198,9 +198,11 @@ command_list_files(int argc, const char *argv[]) struct razor_set *set; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; + razor_set_list_files(set, argv[0]); razor_set_destroy(set); @@ -214,9 +216,10 @@ command_list_file_packages(int argc, const char *argv[]) struct razor_package_iterator *pi; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; pi = razor_package_iterator_create_for_file(set, argv[0]); list_packages(pi, 0); @@ -233,9 +236,11 @@ command_list_package_files(int argc, const char *argv[]) struct razor_set *set; set = razor_set_open(repo_filename); - razor_set_open_files(set, "system-files.repo"); if (set == NULL) return 1; + if (razor_set_open_files(set, "system-files.repo")) + return 1; + razor_set_list_package_files(set, argv[0]); razor_set_destroy(set); @@ -824,7 +829,10 @@ command_info(int argc, const char *argv[]) const char *summary, *description, *url, *license; set = razor_set_open(repo_filename); - razor_set_open_details(set, "system-details.repo"); + if (set == NULL) + return 1; + if (razor_set_open_details(set, "system-details.repo")) + return 1; pi = razor_package_iterator_create(set); while (razor_package_iterator_next(pi, &package, &name, &version, &arch)) { |