diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-12 22:14:10 +0100 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-12 23:43:35 +0100 |
| commit | c8285d9b313ea4ffa78262b5c278e1643befa298 (patch) | |
| tree | 49e08445aa7d3bf27960c131c9cddc3db5b40c61 /cli/btinfo.c | |
| parent | 7b8644dcc1a0db95c3ea321ebb8bc059ab931b42 (diff) | |
| download | btpd-c8285d9b313ea4ffa78262b5c278e1643befa298.tar.gz btpd-c8285d9b313ea4ffa78262b5c278e1643befa298.zip | |
Don't use the bsd err and warn family of functions. Solaris doesn't have them.
Diffstat (limited to 'cli/btinfo.c')
| -rw-r--r-- | cli/btinfo.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/btinfo.c b/cli/btinfo.c index 8c32475..dfcddcb 100644 --- a/cli/btinfo.c +++ b/cli/btinfo.c @@ -1,11 +1,11 @@ #include <sys/types.h> -#include <err.h> #include <errno.h> #include <getopt.h> #include <inttypes.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <time.h> #include "metainfo.h" @@ -75,8 +75,11 @@ main(int argc, char **argv) while (argc > 0) { char *mi = NULL; - if ((mi = mi_load(*argv, NULL)) == NULL) - err(1, "mi_load: %s", *argv); + if ((mi = mi_load(*argv, NULL)) == NULL) { + fprintf(stderr, "failed to load torrent file '%s' (%s).\n", + *argv, strerror(errno)); + exit(1); + } print_metainfo(mi); free(mi); |