From 2aeadb9c78df4b463ffb3293e242e19a7e0d17a9 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 12 Jun 2012 19:25:09 +0100 Subject: Actually do the mmap... unsurprisingly, this makes the indexer work on SFS On RAM: the .idx and .pack files become links to a .lock and the original download respectively. Assume some feature (such as record locking) supported by SFS but not JXFS or RAM: is required. --- src/unix/map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/unix/map.c') diff --git a/src/unix/map.c b/src/unix/map.c index 8e853b9be..b04e95a76 100644 --- a/src/unix/map.c +++ b/src/unix/map.c @@ -39,11 +39,11 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs #else if ((prot & GIT_PROT_WRITE) && ((flags & GIT_MAP_TYPE) == GIT_MAP_SHARED)) { printf("Trying to map shared-writeable file!!!\n"); + } - if(out->data = malloc(len)) { - lseek(fd, offset, SEEK_SET); - p_read(fd, out->data, len); - } + if(out->data = malloc(len)) { + lseek(fd, offset, SEEK_SET); + p_read(fd, out->data, len); } #endif -- cgit v1.2.1