#include <stdio.h>
+#include <inttypes.h>
+#include <string.h>
#include <unistd.h>
#include <getopt.h>
#include <memcached.h>
-#include "client_options.h"
#include "utilities.h"
#define PROGRAM_NAME "memcat"
memcached_st *memc;
char *string;
size_t string_length;
- uint16_t flags;
+ uint32_t flags;
memcached_return rc;
memcached_server_st *servers;
}
else if (rc != MEMCACHED_NOTFOUND)
{
- fprintf(stderr, "memcat: %s: memcache error %s\n",
+ fprintf(stderr, "memcat: %s: memcache error %s",
argv[optind], memcached_strerror(memc, rc));
+ if (memc->cached_errno)
+ fprintf(stderr, " system error %s", strerror(memc->cached_errno));
+ fprintf(stderr, "\n");
}
optind++;
}