Annotation of pkgsrc/sysutils/lsof/patches/patch-ac, revision 1.4
1.4 ! hubertf 1: $NetBSD: patch-ac,v 1.3 1999/06/02 16:14:53 christos Exp $
1.1 bad 2:
1.4 ! hubertf 3: --- dialects/n+obsd/dproc.c.orig Tue Jun 22 23:04:06 1999
! 4: +++ dialects/n+obsd/dproc.c Fri Jun 25 04:13:10 1999
1.2 kleink 5: @@ -150,6 +150,9 @@
6: gather_proc_info()
7: {
8: struct filedesc fd;
9: +#if __NetBSD_Version__ >= 104010000
10: + struct cwdinfo cwdi;
11: +#endif
12: int i, nf;
1.3 christos 13: MALLOC_S nb;
1.2 kleink 14: static struct file **ofb = NULL;
1.4 ! hubertf 15: @@ -231,6 +234,20 @@
1.2 kleink 16: (UID_ARG)uid, p->P_COMM, (int)pss, (int)sf);
17: Plf = (struct lfile *)NULL;
18: Kpa = (KA_T)p->P_ADDR;
19: +#if __NetBSD_Version__ >= 104010000
1.4 ! hubertf 20: + /*
! 21: + * Save current working directory framework information.
! 22: + */
! 23: + (void)memset(&cwdi, 0, sizeof(cwdi));
! 24: + if (p->kp_proc.p_cwdi) {
! 25: + if (kvm_read(Kd, (u_long)p->kp_proc.p_cwdi, &cwdi, sizeof(cwdi))
! 26: + != sizeof(cwdi)) {
! 27: + fprintf(stderr, "%s: cannot read cwdinfo: %s\n", Pn,
! 28: + kvm_geterr(Kd));
! 29: + Exit(1);
! 30: + }
! 31: + }
1.2 kleink 32: +#endif
33: /*
34: * Save current working directory information.
35: */
CVSweb <webmaster@jp.NetBSD.org>