svn commit: r356437 - head/lib/libprocstat

O. Hartmann o.hartmann at walstatt.org
Tue Jan 7 05:43:15 UTC 2020


On Tue, 7 Jan 2020 05:33:33 +0000 (UTC)
Mateusz Guzik <mjg at FreeBSD.org> wrote:

> Author: mjg
> Date: Tue Jan  7 05:33:33 2020
> New Revision: 356437
> URL: https://svnweb.freebsd.org/changeset/base/356437
>
> Log:
>   procstat: read lo_name instead of now removed v_tag
>
> Modified:
>   head/lib/libprocstat/libprocstat.c
>
> Modified: head/lib/libprocstat/libprocstat.c
> ==============================================================================
> --- head/lib/libprocstat/libprocstat.c	Tue Jan  7 04:34:29 2020
> (r356436) +++ head/lib/libprocstat/libprocstat.c	Tue Jan  7 05:33:33
> 2020	(r356437) @@ -1278,10 +1278,10 @@
> procstat_get_vnode_info_kvm(kvm_t *kd, struct filestat vn->vn_type =
> vntype2psfsttype(vnode.v_type); if (vnode.v_type == VNON || vnode.v_type ==
> VBAD) return (0);
> -	error = kvm_read_all(kd, (unsigned long)vnode.v_tag, tagstr,
> -	    sizeof(tagstr));
> +	error = kvm_read_all(kd, (unsigned
> long)vnode.v_lock.lock_object.lo_name,
> +	    tagstr, sizeof(tagstr));
>  	if (error == 0) {
> -		warnx("can't read v_tag at %p", (void *)vp);
> +		warnx("can't read lo_name at %p", (void *)vp);
>  		goto fail;
>  	}
>  	tagstr[sizeof(tagstr) - 1] = '\0';
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"

This commit makes buildworld to fail:

[...]
--- lib/libprocstat__L ---
/usr/src/lib/libprocstat/libprocstat.c:848:2: warning: variable 'files' is used
uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default: ^~~~~~~
/usr/src/lib/libprocstat/libprocstat.c:851:6: note: uninitialized use occurs
here if (files == NULL && errno != EPERM) {
            ^~~~~
/usr/src/lib/libprocstat/libprocstat.c:827:32: note: initialize the variable
'files' to silence this warning struct kinfo_file *kif, *files;
                                      ^
                                       = NULL
/usr/src/lib/libprocstat/libprocstat.c:1281:48: error: no member named 'v_tag'
in 'struct vnode'

[...]

Kind regards,

oh


More information about the svn-src-all mailing list