Annotation of pkgsrc/sysutils/lsof/patches/patch-ac, revision 1.2
1.2 ! kleink 1: $NetBSD: patch-ac,v 1.1 1999/05/05 17:40:38 bad Exp $
1.1 bad 2:
3: --- dialects/n+obsd/dproc.c.orig Tue Nov 24 02:11:24 1998
1.2 ! kleink 4: +++ dialects/n+obsd/dproc.c Thu May 20 10:45:27 1999
! 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;
! 13: static int nofb = 0;
! 14: static struct file **ofb = NULL;
! 15: @@ -208,23 +211,53 @@
! 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
! 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: + }
! 32: +#endif
! 33: /*
! 34: * Save current working directory information.
! 35: */
! 36: +#if __NetBSD_Version__ >= 104010000
! 37: + if (cwdi.cwdi_cdir) {
! 38: +#else
! 39: if (fd.fd_cdir) {
! 40: +#endif
! 41: alloc_lfile(CWD, -1);
! 42: Cfp = (struct file *)NULL;
! 43: +#if __NetBSD_Version__ >= 104010000
! 44: + process_node((KA_T)cwdi.cwdi_cdir);
! 45: +#else
! 46: process_node((KA_T)fd.fd_cdir);
! 47: +#endif
! 48: if (Lf->sf)
! 49: link_lfile();
! 50: }
! 51: /*
! 52: * Save root directory information.
! 53: */
! 54: +#if __NetBSD_Version__ >= 104010000
! 55: + if (cwdi.cwdi_rdir) {
! 56: +#else
! 57: if (fd.fd_rdir) {
! 58: +#endif
! 59: alloc_lfile(RTD, -1);
! 60: Cfp = (struct file *)NULL;
! 61: +#if __NetBSD_Version__ >= 104010000
! 62: + process_node((KA_T)cwdi.cwdi_rdir);
! 63: +#else
! 64: process_node((KA_T)fd.fd_rdir);
! 65: +#endif
! 66: if (Lf->sf)
! 67: link_lfile();
! 68: }
! 69: @@ -394,11 +427,11 @@
1.1 bad 70: int i, j;
71: KA_T ka;
72: int n = 0;
73: - struct pager_struct pg;
74: struct vm_map_entry vmme, *e;
75: struct vmspace vmsp;
76:
77: #if !defined(UVM)
78: + struct pager_struct pg;
79: struct vm_object vmo;
80: #endif /* !defined(UVM) */
81:
CVSweb <webmaster@jp.NetBSD.org>