From c0dd0102a57b8d6f52c9ebf7b2d1473755c3abee Mon Sep 17 00:00:00 2001 From: Moinak Ghosh Date: Fri, 14 Jun 2013 22:25:01 +0530 Subject: [PATCH] A few minor fixes. --- pcompress.c | 2 +- rabin/global/dedupe_config.c | 1 - rabin/global/index.c | 1 + rabin/rabin_dedup.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcompress.c b/pcompress.c index d7afe6b..706c468 100644 --- a/pcompress.c +++ b/pcompress.c @@ -1795,7 +1795,7 @@ start_compress(pc_ctx_t *pctx, const char *filename, uint64_t chunksize, int lev /* A host of sanity checks. */ if (!pctx->pipe_mode) { char *tmp; - if ((uncompfd = open(filename, O_RDWR, 0)) == -1) { + if ((uncompfd = open(filename, O_RDONLY, 0)) == -1) { err_print(1, "Cannot open: %s", filename); return (1); } diff --git a/rabin/global/dedupe_config.c b/rabin/global/dedupe_config.c index 42f13ac..2a05532 100644 --- a/rabin/global/dedupe_config.c +++ b/rabin/global/dedupe_config.c @@ -361,7 +361,6 @@ int set_config_s(archive_config_t *cfg, const char *algo, cksum_t ck, cksum_t ck_sim, uint32_t chunksize, size_t file_sz, uint64_t user_chunk_sz, int pct_interval) { - cfg->algo = get_compress_algo(algo); cfg->chunk_cksum_type = ck; cfg->similarity_cksum = ck_sim; diff --git a/rabin/global/index.c b/rabin/global/index.c index b2c6b43..f5d4af8 100644 --- a/rabin/global/index.c +++ b/rabin/global/index.c @@ -268,6 +268,7 @@ init_global_db_s(char *path, char *tmppath, uint32_t chunksize, uint64_t user_ch if (pct_interval > 0) { int errored; + DEBUG_STAT_EN(printf("Using Segmented Global Deduplication.\n")); strcpy(cfg->rootdir, tmppath); strcat(cfg->rootdir, "/.segXXXXXX"); cfg->seg_fd_w = mkstemp(cfg->rootdir); diff --git a/rabin/rabin_dedup.h b/rabin/rabin_dedup.h index f8c5bd0..2d4cdda 100644 --- a/rabin/rabin_dedup.h +++ b/rabin/rabin_dedup.h @@ -63,7 +63,7 @@ #ifndef _RABIN_POLY_H_ #define _RABIN_POLY_H_ -#include "utils.h" +#include #include #include #include