projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0fe89c
)
Allow writing to the private index file mapping.
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 27 Apr 2005 02:27:27 +0000
(19:27 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 27 Apr 2005 02:27:27 +0000
(19:27 -0700)
We now modify the in-memory copy of the index file in "diff-cache", so
we need to add PROT_WRITE.
read-cache.c
patch
|
blob
|
history
diff --git
a/read-cache.c
b/read-cache.c
index
2354e80
..
53f1da8
100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-198,7
+198,7
@@
int read_cache(void)
size = st.st_size;
errno = EINVAL;
if (size >= sizeof(struct cache_header) + 20)
- map = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
+ map = mmap(NULL, size, PROT_READ
| PROT_WRITE
, MAP_PRIVATE, fd, 0);
}
close(fd);
if (-1 == (int)(long)map)