diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-08-07 03:48:56 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-08-07 03:48:56 +0200 |
commit | e15b523a6c9b60a56fdb8d2cecdd55a7157d1b6c (patch) | |
tree | 5de105f5960d6e9ca8e5e944ae7170dfabe904e8 /sys/src/libmach | |
parent | 6baaf0a7735a875d5d5384362e535ce127996926 (diff) |
libmach: fix acid -k regression (was broken in r5eeb36d3ddd0)
Diffstat (limited to 'sys/src/libmach')
-rwxr-xr-x[-rw-r--r--] | sys/src/libmach/map.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/libmach/map.c b/sys/src/libmach/map.c index c745d82a6..c668defd1 100644..100755 --- 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); |