FreeBSD Bugzilla – Attachment 219630 Details for
Bug 251096
sysutils/lsof: Update to 4.94
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch file
sysutils_lsof.patch (text/plain), 9.53 KB, created by
Yasuhiro Kimura
on 2020-11-13 09:38:34 UTC
(
hide
)
Description:
Patch file
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2020-11-13 09:38:34 UTC
Size:
9.53 KB
patch
obsolete
>Index: sysutils/lsof/Makefile >=================================================================== >--- sysutils/lsof/Makefile (revision 554926) >+++ sysutils/lsof/Makefile (working copy) >@@ -5,8 +5,7 @@ > # to commit it. I (ler) don't have access to all the ARCH's > > PORTNAME= lsof >-DISTVERSION= 4.93.2 >-PORTREVISION= 14 >+DISTVERSION= 4.94.0 > PORTEPOCH= 8 > CATEGORIES= sysutils > >Index: sysutils/lsof/distinfo >=================================================================== >--- sysutils/lsof/distinfo (revision 554926) >+++ sysutils/lsof/distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1557404723 >-SHA256 (lsof-org-lsof-4.93.2_GH0.tar.gz) = 3df912bd966fc24dc73ddea3e36a61d79270b21b085936a4caabca56e5b486a2 >-SIZE (lsof-org-lsof-4.93.2_GH0.tar.gz) = 1319222 >+TIMESTAMP = 1605257406 >+SHA256 (lsof-org-lsof-4.94.0_GH0.tar.gz) = a9865eeb581c3abaac7426962ddb112ecfd86a5ae93086eb4581ce100f8fa8f4 >+SIZE (lsof-org-lsof-4.94.0_GH0.tar.gz) = 1340224 >Index: sysutils/lsof/files/patch-Configure >=================================================================== >--- sysutils/lsof/files/patch-Configure (revision 554926) >+++ sysutils/lsof/files/patch-Configure (nonexistent) >@@ -1,11 +0,0 @@ >---- Configure.orig 2019-05-22 14:43:59 UTC >-+++ Configure >-@@ -1639,7 +1639,7 @@ kernel generation process. >- # Clear LSOF_UNSUP message for supported versions of FreeBSD. >- >- case $LSOF_VERS in # { >-- 4090|8020|8030|8040|9000|10000|11000|12000) >-+ 4090|8020|8030|8040|9000|10000|11000|12000|13000) >- LSOF_UNSUP="" >- ;; >- esac # } >Index: sysutils/lsof/files/patch-dialects-freebsd-dlsof.h >=================================================================== >--- sysutils/lsof/files/patch-dialects-freebsd-dlsof.h (revision 554926) >+++ sysutils/lsof/files/patch-dialects-freebsd-dlsof.h (working copy) >@@ -1,40 +1,6 @@ >---- dialects/freebsd/dlsof.h.orig 2019-05-08 07:32:25 UTC >+--- dialects/freebsd/dlsof.h.orig 2020-11-10 19:00:21 UTC > +++ dialects/freebsd/dlsof.h >-@@ -38,6 +38,7 @@ >- #if !defined(FREEBSD_LSOF_H) >- #define FREEBSD_LSOF_H 1 >- >-+#include <stddef.h> >- #include <stdlib.h> >- #include <dirent.h> >- #include <nlist.h> >-@@ -45,6 +46,12 @@ >- #include <signal.h> >- #include <unistd.h> >- >-+#if FREEBSDV>=13000 >-+/* This header is a huge mess. Please don't support EOL FreeBSD releases. */ >-+#define _KERNEL 1 >-+#include <sys/_lock.h> >-+#undef _KERNEL >-+#endif /* FREEBSDV>=13000 */ >- # if FREEBSDV>=4000 >- # if FREEBSDV>=5000 >- # if FREEBSDV<6020 >-@@ -105,6 +112,12 @@ typedef struct device *device_t; >- >- #include <sys/conf.h> >- >-+/* >-+ * include <stdbool.h> for refcount(9) >-+ */ >-+#include <stdbool.h> >-+ >-+ >- # if defined(HAS_VM_MEMATTR_T) >- #undef vm_memattr_t >- # endif /* defined(HAS_VM_MEMATTR_T) */ >-@@ -652,9 +665,15 @@ struct sfile { >+@@ -663,9 +663,15 @@ struct sfile { > */ > > struct namecache { >Index: sysutils/lsof/files/patch-dialects_freebsd_dnode.c >=================================================================== >--- sysutils/lsof/files/patch-dialects_freebsd_dnode.c (revision 554926) >+++ sysutils/lsof/files/patch-dialects_freebsd_dnode.c (nonexistent) >@@ -1,21 +0,0 @@ >---- dialects/freebsd/dnode.c.orig 2019-05-08 07:32:25 UTC >-+++ dialects/freebsd/dnode.c >-@@ -58,9 +58,7 @@ _PROTOTYPE(static int lkup_dev_tty,(dev_t *dr, INODETY >- >- >- #if defined(HAS_TMPFS) >--#define _KERNEL >- #include <fs/tmpfs/tmpfs.h> >--#undef _KERNEL >- #endif /* defined(HAS_TMPFS) */ >- >- _PROTOTYPE(static void get_lock_state,(KA_T f)); >-@@ -562,7 +560,7 @@ process_overlaid_node: >- * Get the pseudo vnode tag type for FreeBSD >= 5. >- */ >- vtag = VT_UNKNOWN; >-- if (v->v_tag && !kread((KA_T)v->v_tag, (char *)&vtbuf, sizeof(vtbuf))) >-+ if (!kread((KA_T)v->v_lock.lock_object.lo_name, (char *)&vtbuf, sizeof(vtbuf))) >- { >- vtbuf[sizeof(vtbuf) - 1] = '\0'; >- vtbp = vtbuf; >Index: sysutils/lsof/files/patch-dialects_freebsd_dnode2.c >=================================================================== >--- sysutils/lsof/files/patch-dialects_freebsd_dnode2.c (revision 554926) >+++ sysutils/lsof/files/patch-dialects_freebsd_dnode2.c (nonexistent) >@@ -1,17 +0,0 @@ >---- dialects/freebsd/dnode2.c.orig 2019-05-08 07:32:25 UTC >-+++ dialects/freebsd/dnode2.c >-@@ -49,7 +49,13 @@ static char *rcsid = "$Id: dnode2.c,v 1.7 2018/02/14 1 >- * >- * Note: clang's complaint about VOP_FSYNC can't be avoided. >- */ >--#define VOP_UNLOCK(vp, f) ((void)0) >-+#include <sys/param.h> >-+#if __FreeBSD_version >= 1300074 >-+#define VOP_UNLOCK_FLAGS(vp, f) ((void)0) >-+#define VOP_UNLOCK(vp) ((void)0) >-+#else >-+#define VOP_UNLOCK(vp, f) ((void)0) >-+#endif >- # endif /* defined(__clang__) */ >- >- #define KLD_MODULE /* for ARM: prevent "ARM_NARCH is 0 " error */ >Index: sysutils/lsof/files/patch-dialects_freebsd_dproc.c >=================================================================== >--- sysutils/lsof/files/patch-dialects_freebsd_dproc.c (revision 554926) >+++ sysutils/lsof/files/patch-dialects_freebsd_dproc.c (nonexistent) >@@ -1,157 +0,0 @@ >---- dialects/freebsd/dproc.c.orig 2019-05-08 07:32:25 UTC >-+++ dialects/freebsd/dproc.c >-@@ -37,6 +37,14 @@ static char *rcsid = "$Id: dproc.c,v 1.20 2018/02/14 1 >- >- #include "lsof.h" >- >-+/* >-+ * This is not an exact version but it should not matter. At worst there >-+ * is a small version window where this lsof does not compile on older >-+ * -CURRENT. >-+ */ >-+#if __FreeBSD_version >= 1300081 >-+#define HAS_PWD >-+#endif >- >- _PROTOTYPE(static void enter_vn_text,(KA_T va, int *n)); >- _PROTOTYPE(static void get_kernel_access,(void)); >-@@ -132,6 +140,15 @@ gather_proc_info() >- KA_T fa; >- #endif /* defined(HAS_FDESCENTTBL) */ >- >-+#if defined(HAS_PWD) >-+ struct pwd pwd; >-+ KA_T pwd_addr; >-+#endif /* defined(HAS_FDESCENTTBL) */ >-+ >-+ struct vnode *cdir; >-+ struct vnode *rdir; >-+ struct vnode *jdir; >-+ >- static ofb_t *ofb = NULL; >- static int ofbb = 0; >- int pgid, pid; >-@@ -305,13 +322,29 @@ gather_proc_info() >- if (!fd.fd_files >- || kread((KA_T)fd.fd_files, (char *)&fdt, sizeof(fdt))) >- continue; >-- if (!fd.fd_refcnt || fd.fd_lastfile > fdt.fdt_nfiles) >-+ if (!fd.fd_refcnt) >- continue; >- #else /* !defined(HAS_FDESCENTTBL) */ >- if (!fd.fd_refcnt || fd.fd_lastfile > fd.fd_nfiles) >- continue; >- #endif /* defined(HAS_FDESCENTTBL) */ >- >-+#if defined(HAS_PWD) >-+ cdir = rdir = jdir = NULL; >-+ pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd); >-+ if (pwd_addr != 0) { >-+ if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) { >-+ cdir = pwd.pwd_cdir; >-+ rdir = pwd.pwd_rdir; >-+ jdir = pwd.pwd_jdir; >-+ } >-+ } >-+#else >-+ cdir = fd.fd_cdir; >-+ rdir = fd.fd_rdir; >-+ jdir = fd.fd_jdir; >-+#endif >-+ >- /* >- * Allocate a local process structure. >- */ >-@@ -347,20 +380,20 @@ gather_proc_info() >- /* >- * Save current working directory information. >- */ >-- if (!ckscko && fd.fd_cdir) { >-+ if (!ckscko && cdir) { >- alloc_lfile(CWD, -1); >- Cfp = (struct file *)NULL; >-- process_node((KA_T)fd.fd_cdir); >-+ process_node((KA_T)cdir); >- if (Lf->sf) >- link_lfile(); >- } >- /* >- * Save root directory information. >- */ >-- if (!ckscko && fd.fd_rdir) { >-+ if (!ckscko && rdir) { >- alloc_lfile(RTD, -1); >- Cfp = (struct file *)NULL; >-- process_node((KA_T)fd.fd_rdir); >-+ process_node((KA_T)rdir); >- if (Lf->sf) >- link_lfile(); >- } >-@@ -369,10 +402,10 @@ gather_proc_info() >- /* >- * Save jail directory information. >- */ >-- if (!ckscko && fd.fd_jdir) { >-+ if (!ckscko && jdir) { >- alloc_lfile("jld", -1); >- Cfp = (struct file *)NULL; >-- process_node((KA_T)fd.fd_jdir); >-+ process_node((KA_T)jdir); >- if (Lf->sf) >- link_lfile(); >- } >-@@ -655,7 +688,29 @@ kread(addr, buf, len) >- return((br == len) ? 0 : 1); >- } >- >-+static int >-+vm_map_reader(void *token, vm_map_entry_t addr, vm_map_entry_t dest) >-+{ >-+ return (kread((KA_T)addr, (char *)dest, sizeof(*dest))); >-+} >- >-+#if __FreeBSD_version < 1300060 >-+typedef int vm_map_entry_reader(void *token, vm_map_entry_t addr, >-+ vm_map_entry_t dest); >-+ >-+static inline vm_map_entry_t >-+vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, >-+ vm_map_entry_reader reader) >-+{ >-+ vm_map_entry_t next; >-+ >-+ next = clone->next; >-+ if (!reader(token, next, clone)) >-+ return (NULL); >-+ return (next); >-+} >-+#endif /* __FreeBSD_version < 1300060 */ >-+ >- /* >- * process_text() - process text information >- */ >-@@ -682,20 +737,15 @@ process_text(vm) >- /* >- * Read the vm_map structure. Search its vm_map_entry structure list. >- */ >-+ vmme = vmsp.vm_map.header; >-+ e = &vmme; >- for (i = 0; i < vmsp.vm_map.nentries; i++) { >- >- /* >- * Read the next vm_map_entry. >- */ >-- if (i == 0) >-- e = &vmsp.vm_map.header; >-- else { >-- if (!(ka = (KA_T)e->next)) >-- return; >-- e = &vmme; >-- if (kread(ka, (char *)e, sizeof(vmme))) >-- return; >-- } >-+ if (!vm_map_entry_read_succ(NULL, e, vm_map_reader)) >-+ return; >- >- #if defined(MAP_ENTRY_IS_A_MAP) >- if (e->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) >Index: sysutils/lsof/files/patch-dialects_freebsd_dsock.c >=================================================================== >--- sysutils/lsof/files/patch-dialects_freebsd_dsock.c (revision 554926) >+++ sysutils/lsof/files/patch-dialects_freebsd_dsock.c (nonexistent) >@@ -1,11 +0,0 @@ >---- dialects/freebsd/dsock.c.orig 2019-05-08 07:32:25 UTC >-+++ dialects/freebsd/dsock.c >-@@ -182,7 +182,7 @@ process_socket(sa) >- #endif /* FREEBSDV<4050 */ >- >- #if defined(HASIPv6) && !defined(HASINRIAIPv6) >-- struct in6pcb in6p; >-+ struct inpcb in6p; >- #endif /* defined(HASIPv6) && !defined(HASINRIAIPv6) */ >- >- (void) snpf(Lf->type, sizeof(Lf->type), "sock");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251096
:
219630
|
219789
|
219864
|
220023
|
221093
|
221153
|
222017