From dda1b00937723481c7cd1692fc4289e191ee4072 Mon Sep 17 00:00:00 2001 From: leitner Date: Mon, 7 Dec 2020 15:00:54 +0000 Subject: [PATCH] mmap_private opens the file for reading, not for writing --- mmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmap.h b/mmap.h index 47d4516..0681f9b 100644 --- a/mmap.h +++ b/mmap.h @@ -15,7 +15,7 @@ const char* mmap_read(const char *filename,size_t* filesize); /* like mmap_read but use openat instead of open */ const char* mmap_readat(const char *filename,size_t* filesize,int dirfd); -/* open file for writing, mmap whole file privately (copy on write), +/* open file for reading, mmap whole file privately (copy on write), * close file, write length of map in filesize and return pointer to * map. */ char* mmap_private(const char *filename,size_t* filesize);