From e15b523a6c9b60a56fdb8d2cecdd55a7157d1b6c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 7 Aug 2012 03:48:56 +0200 Subject: [PATCH] libmach: fix acid -k regression (was broken in r5eeb36d3ddd0) --- sys/src/libmach/map.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 sys/src/libmach/map.c diff --git a/sys/src/libmach/map.c b/sys/src/libmach/map.c old mode 100644 new mode 100755 index c745d82a6..c668defd1 --- a/sys/src/libmach/map.c +++ b/sys/src/libmach/map.c @@ -89,11 +89,13 @@ attachproc(int pid, int kflag, int corefd, Fhdr *fp) map = newmap(0, 4); if (!map) return 0; - if(kflag) + if(kflag) { regs = "kregs"; - else + mode = OREAD; + } else { regs = "regs"; - mode = ORDWR; + mode = ORDWR; + } if (mach->regsize) { sprint(buf, "/proc/%d/%s", pid, regs); fd = open(buf, mode);