kvm_proc.c (4095) | kvm_proc.c (6683) |
---|---|
1/*- 2 * Copyright (c) 1989, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software developed by the Computer Systems 6 * Engineering group at Lawrence Berkeley Laboratory under DARPA contract 7 * BG 91-66 and contributed to Berkeley. 8 * --- 451 unchanged lines hidden (view full) --- 460 * We're stopping prematurely. Terminate the 461 * argv and current string. 462 */ 463 *++argv = 0; 464 *cp = 0; 465 return (kd->argv); 466 } 467 } | 1/*- 2 * Copyright (c) 1989, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software developed by the Computer Systems 6 * Engineering group at Lawrence Berkeley Laboratory under DARPA contract 7 * BG 91-66 and contributed to Berkeley. 8 * --- 451 unchanged lines hidden (view full) --- 460 * We're stopping prematurely. Terminate the 461 * argv and current string. 462 */ 463 *++argv = 0; 464 *cp = 0; 465 return (kd->argv); 466 } 467 } |
468 return (0); |
|
468} 469 470static void 471ps_str_a(p, addr, n) 472 struct ps_strings *p; 473 u_long *addr; 474 int *n; 475{ --- 98 unchanged lines hidden (view full) --- 574 register u_long uva; 575 register char *buf; 576 register size_t len; 577{ 578 register char *cp; 579 char procfile[MAXPATHLEN]; 580 ssize_t amount; 581 int fd; | 469} 470 471static void 472ps_str_a(p, addr, n) 473 struct ps_strings *p; 474 u_long *addr; 475 int *n; 476{ --- 98 unchanged lines hidden (view full) --- 575 register u_long uva; 576 register char *buf; 577 register size_t len; 578{ 579 register char *cp; 580 char procfile[MAXPATHLEN]; 581 ssize_t amount; 582 int fd; |
582 u_long tmpuva = uva; 583 int i; 584 char *chr; | |
585 586 cp = buf; 587 588 sprintf(procfile, "/proc/%d/mem", p->p_pid); 589 fd = open(procfile, O_RDONLY, 0); 590 591 if (fd < 0) { 592 _kvm_err(kd, kd->program, "cannot open %s", procfile); --- 23 unchanged lines hidden --- | 583 584 cp = buf; 585 586 sprintf(procfile, "/proc/%d/mem", p->p_pid); 587 fd = open(procfile, O_RDONLY, 0); 588 589 if (fd < 0) { 590 _kvm_err(kd, kd->program, "cannot open %s", procfile); --- 23 unchanged lines hidden --- |