diff options
| author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2026-05-10 20:03:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-10 20:03:12 -0400 |
| commit | 58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26 (patch) | |
| tree | 965264cfc865df78276da47eece86130a6b2b6b5 /src/cli/stasis_indexer/helpers.c | |
| parent | 0ef06cbec6f3796db244501b4c5fec2d579c7e5b (diff) | |
| parent | 70f20294bd63e9774ee0c8a7a032ac63e1a1da2e (diff) | |
| download | stasis-58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26.tar.gz | |
Merge pull request #142 from jhunkeler/execpoint
Improve messaging functions
Diffstat (limited to 'src/cli/stasis_indexer/helpers.c')
| -rw-r--r-- | src/cli/stasis_indexer/helpers.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cli/stasis_indexer/helpers.c b/src/cli/stasis_indexer/helpers.c index 425d209..1bb5862 100644 --- a/src/cli/stasis_indexer/helpers.c +++ b/src/cli/stasis_indexer/helpers.c @@ -2,6 +2,8 @@ // Created by jhunk on 11/15/24. // +#include <fnmatch.h> + #include "core.h" #include "helpers.h" @@ -165,7 +167,7 @@ int micromamba_configure(const struct Delivery *ctx, struct MicromambaInfo *m) { // 1 = nul terminator char *pathvar = calloc(pathvar_len, sizeof(*pathvar)); if (!pathvar) { - SYSERROR("%s", "Unable to allocate bytes for temporary path string"); + SYSERROR("Unable to allocate bytes for temporary path string"); exit(1); } snprintf(pathvar, pathvar_len, "%s/bin:%s:%s", m->conda_prefix, m->micromamba_prefix, getenv("PATH")); @@ -250,12 +252,12 @@ int get_files(struct StrList **out, const char *path, const char *pattern, ...) char userpattern[PATH_MAX] = {0}; const int len = vsnprintf(userpattern, sizeof(userpattern), pattern, args); if (len < 0) { - SYSERROR("%s", "vsnprintf failed\n"); + SYSERROR("vsnprintf failed"); va_end(args); return -1; } if ((size_t) len > sizeof(userpattern)) { - fprintf(stderr, "WARNING: %s: userpattern truncated!\n", __FUNCTION__); + SYSWARN("%s: userpattern truncated!", __FUNCTION__); } va_end(args); if (!strlen(userpattern)) { @@ -297,7 +299,7 @@ struct StrList *get_docker_images(struct Delivery *ctx, char *pattern) { char *tarball = NULL; asprintf(&tarball, "%s*.tar*", pattern); if (!tarball) { - SYSERROR("%s", "Unable to allocate bytes for docker image wildcard pattern"); + SYSERROR("Unable to allocate bytes for docker image wildcard pattern"); return NULL; } tolower_s(tarball); |
