libmach: fix acid -k regression (was broken in r5eeb36d3ddd0)
This commit is contained in:
parent
6baaf0a773
commit
e15b523a6c
1 changed files with 5 additions and 3 deletions
8
sys/src/libmach/map.c
Normal file → Executable file
8
sys/src/libmach/map.c
Normal file → Executable file
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue