summaryrefslogtreecommitdiff
path: root/src/binfmt.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-04-28 23:51:24 +0200
committerKay Sievers <kay.sievers@vrfy.org>2011-04-28 23:51:24 +0200
commit44143309dd0b37d61d7d842ca58f01a65646ec71 (patch)
treeb22d8adcb45561c41348bc4361a24b9cc673d6f1 /src/binfmt.c
parentb23de6af893c11da4286bc416455cd0926d1532e (diff)
util: conf_files_list() return list as parameter
Diffstat (limited to 'src/binfmt.c')
-rw-r--r--src/binfmt.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/binfmt.c b/src/binfmt.c
index 619f6e4aa7..be1f1ff097 100644
--- a/src/binfmt.c
+++ b/src/binfmt.c
@@ -135,11 +135,16 @@ int main(int argc, char *argv[]) {
/* Flush out all rules */
write_one_line_file("/proc/sys/fs/binfmt_misc/status", "-1");
- files = conf_files_list(".conf",
- "/run/binfmt.d",
- "/etc/binfmt.d",
- "/usr/lib/binfmt.d",
- NULL);
+ r = conf_files_list(&files, ".conf",
+ "/run/binfmt.d",
+ "/etc/binfmt.d",
+ "/usr/lib/binfmt.d",
+ NULL);
+
+ if (r < 0) {
+ log_error("Failed to enumerate binfmt.d files: %s", strerror(-r));
+ goto finish;
+ }
STRV_FOREACH(f, files) {
int k;
@@ -151,5 +156,6 @@ int main(int argc, char *argv[]) {
strv_free(files);
}
+finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}