From cacd80358a292c020978a2a2f49a1be69252ebcc Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Sun, 12 Jul 2009 15:07:00 -0300
Subject: [PATCH 19/74] libjio: Remove unused checksum_fd()

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 libjio/checksum.c |   17 -----------------
 libjio/common.h   |    1 -
 2 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/libjio/checksum.c b/libjio/checksum.c
index 225a8af..252c03f 100644
--- a/libjio/checksum.c
+++ b/libjio/checksum.c
@@ -91,20 +91,3 @@ uint32_t checksum_buf(uint32_t crc32, const unsigned char *buf, size_t count)
 	return ~crc32;
 }
 
-/** Reads the contents of the given fd, up to len bytes, and stores the
- * checksum in csum. Returns 1 on success, 0 on error. */
-int checksum_fd(int fd, size_t len, uint32_t *csum)
-{
-	uint8_t *map;
-
-	map = (uint8_t *) mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
-	if (map == MAP_FAILED)
-		return 0;
-
-	*csum = checksum_buf(0, map, len);
-
-	munmap(map, len);
-	return 1;
-}
-
-
diff --git a/libjio/common.h b/libjio/common.h
index d0f3ad8..512355a 100644
--- a/libjio/common.h
+++ b/libjio/common.h
@@ -77,7 +77,6 @@ void get_jtfile(struct jfs *fs, unsigned int tid, char *jtfile);
 uint64_t ntohll(uint64_t x);
 uint64_t htonll(uint64_t x);
 
-int checksum_fd(int fd, size_t len, uint32_t *csum);
 uint32_t checksum_buf(uint32_t sum, const unsigned char *buf, size_t count);
 
 void autosync_check(struct jfs *fs);
-- 
1.6.2.2.646.gb214


