From 3c087a2f30fa29e55c01171b0ea9eecd34fc604f Mon Sep 17 00:00:00 2001 From: John Dyson Date: Sat, 27 Jul 1996 19:47:04 +0000 Subject: [PATCH] Modify slightly the output from the map file in /proc. Now the executable bit is shown. --- sys/fs/procfs/procfs_map.c | 6 ++++-- sys/miscfs/procfs/procfs_map.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index ef71909b6d9..fcf819ce01d 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -152,10 +152,12 @@ case OBJT_DEVICE: * format: * start, end, resident, private resident, cow, access, type. */ - sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s %s %s\n", + sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s%s%s %s %s\n", entry->start, entry->end, resident, privateresident, - (entry->protection & VM_PROT_WRITE)?"RW":"RO", + (entry->protection & VM_PROT_READ)?"r":"-", + (entry->protection & VM_PROT_WRITE)?"w":"-", + (entry->protection & VM_PROT_EXECUTE)?"x":"-", entry->copy_on_write?"COW":" ", type); diff --git a/sys/miscfs/procfs/procfs_map.c b/sys/miscfs/procfs/procfs_map.c index ef71909b6d9..fcf819ce01d 100644 --- a/sys/miscfs/procfs/procfs_map.c +++ b/sys/miscfs/procfs/procfs_map.c @@ -152,10 +152,12 @@ case OBJT_DEVICE: * format: * start, end, resident, private resident, cow, access, type. */ - sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s %s %s\n", + sprintf(mebuffer, "0x%-8.8x 0x%-8.8x %9d %9d %s%s%s %s %s\n", entry->start, entry->end, resident, privateresident, - (entry->protection & VM_PROT_WRITE)?"RW":"RO", + (entry->protection & VM_PROT_READ)?"r":"-", + (entry->protection & VM_PROT_WRITE)?"w":"-", + (entry->protection & VM_PROT_EXECUTE)?"x":"-", entry->copy_on_write?"COW":" ", type); -- 2.45.2