Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2020 06:43:02 +0100
From:      "O. Hartmann" <o.hartmann@walstatt.org>
To:        Mateusz Guzik <mjg@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r356437 - head/lib/libprocstat
Message-ID:  <20200107064255.18dad9d2@freyja>
In-Reply-To: <202001070533.0075XX7D076100@repo.freebsd.org>
References:  <202001070533.0075XX7D076100@repo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

On Tue, 7 Jan 2020 05:33:33 +0000 (UTC)
Mateusz Guzik <mjg@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@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


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200107064255.18dad9d2>