From ce2b15f40709f03540911e58ea8d2f4e4f3dd269 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Thu, 4 Jun 2020 23:17:45 +0300 Subject: Map VC memory as RO, fix error message. --- vc-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vc-log.c') 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(); } -- cgit