Compare commits

...

2 Commits

Author SHA1 Message Date
dfcc827103 libc: Add PROT_EXEC 2022-11-02 18:40:05 +01:00
07e518c38f Kernel: Make sys_mmap log the correct prot value 2022-11-02 18:39:58 +01:00
2 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,7 @@ static const char* format_prot(int prot)
prot_string[3] = 0;
prot_string[0] = ((prot & PROT_READ) > 0) ? 'r' : '-';
prot_string[1] = ((prot & PROT_WRITE) > 0) ? 'w' : '-';
prot_string[2] = ((prot & PROT_WRITE) > 0) ? 'x' : '-';
prot_string[2] = ((prot & PROT_EXEC) > 0) ? 'x' : '-';
return prot_string;
}

View File

@ -10,6 +10,7 @@
#define PROT_NONE 0
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
#define PAGE_SIZE 4096