summaryrefslogtreecommitdiff
path: root/vc-log.c
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2020-06-04 23:17:45 +0300
committerHristo Venev <hristo@venev.name>2020-06-04 23:17:45 +0300
commitce2b15f40709f03540911e58ea8d2f4e4f3dd269 (patch)
treef0ef3dc08d564ac691faac3c5056cf137a1b9b00 /vc-log.c
parent1bca4035abb8c75a36413340612e5531a8bbaf19 (diff)
Map VC memory as RO, fix error message.
Diffstat (limited to 'vc-log.c')
-rw-r--r--vc-log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vc-log.c b/vc-log.c
index e1e3b63..dce8822 100644
--- a/vc-log.c
+++ b/vc-log.c
@@ -151,7 +151,7 @@ static void vc_open(void) {
abort();
}
- vc_mem = mmap(NULL, vc_mem_size, PROT_READ | PROT_WRITE, MAP_SHARED, vc_fd, 0);
+ vc_mem = mmap(NULL, vc_mem_size, PROT_READ, MAP_SHARED, vc_fd, 0);
if(vc_mem == MAP_FAILED) {
perror("mmap");
abort();
@@ -236,7 +236,7 @@ static void vc_log_read_all(void) {
uint32_t log_magic = vc_read_u32(log_start);
if(log_magic != 0x564c4f47) {
- fprintf(stderr, "bad log magic: %x, wanted 4c4f4756\n", log_magic);
+ fprintf(stderr, "bad log magic: %x, wanted 564c4f47\n", log_magic);
abort();
}