aboutsummaryrefslogtreecommitdiff
path: root/src/cli/stasis_indexer/helpers.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-11 15:47:09 -0400
committerGitHub <noreply@github.com>2026-05-11 15:47:09 -0400
commit4649a889a916aa377ebd3ca8f3daa9ac703baa34 (patch)
tree993173328bdf96eb469c2412241f202cdbc5cf53 /src/cli/stasis_indexer/helpers.c
parent58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26 (diff)
parentb7a60c5bed989a52a53b8b697203f55367f55a89 (diff)
downloadstasis-4649a889a916aa377ebd3ca8f3daa9ac703baa34.tar.gz
Merge pull request #143 from jhunkeler/use-sys-macros
Replace msg, perror, and fprintf with SYS message macros
Diffstat (limited to 'src/cli/stasis_indexer/helpers.c')
-rw-r--r--src/cli/stasis_indexer/helpers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cli/stasis_indexer/helpers.c b/src/cli/stasis_indexer/helpers.c
index 1bb5862..097b0ca 100644
--- a/src/cli/stasis_indexer/helpers.c
+++ b/src/cli/stasis_indexer/helpers.c
@@ -89,7 +89,7 @@ int get_pandoc_version(size_t *result) {
int pandoc_exec(const char *in_file, const char *out_file, const char *css_file, const char *title) {
if (!find_program("pandoc")) {
- fprintf(stderr, "pandoc is not installed: unable to generate HTML indexes\n");
+ SYSWARN("pandoc is not installed: unable to generate HTML indexes");
return 0;
}
@@ -227,7 +227,7 @@ struct Delivery **get_latest_deliveries(struct Delivery **ctx, size_t nelem, siz
struct Delivery **result = calloc(nelem + 1, sizeof(*result));
if (!result) {
- fprintf(stderr, "Unable to allocate %zu bytes for result delivery array: %s\n", nelem * sizeof(*result), strerror(errno));
+ SYSERROR("Unable to allocate %zu bytes for result delivery array: %s", nelem * sizeof(*result), strerror(errno));
return NULL;
}
@@ -287,7 +287,7 @@ int get_files(struct StrList **out, const char *path, const char *pattern, ...)
}
}
if (no_match >= strlist_count(list)) {
- fprintf(stderr, "no files matching the pattern: %s\n", userpattern);
+ SYSERROR("no files matching the pattern: %s", userpattern);
guard_strlist_free(&list);
return -1;
}
@@ -392,7 +392,7 @@ int write_manifest(const char *path, char **exclude_path, FILE *fp) {
struct dirent *rec = NULL;
DIR *dp = opendir(path);
if (!dp) {
- perror(path);
+ SYSERROR("unable to open directory: %s, %s", path ? path : "NULL", strerror(errno));
return -1;
}
while ((rec = readdir(dp)) != NULL) {