PERFORCE change 111922 for review

Brooks Davis brooks at one-eyed-alien.net
Mon Dec 18 21:12:37 PST 2006


On Tue, Dec 19, 2006 at 04:29:50AM +0000, Matt Jacob wrote:
> http://perforce.freebsd.org/chv.cgi?CH=111922
> 
> Change 111922 by mjacob at mjexp_6 on 2006/12/19 04:29:03
> 
> 	Fix !($*(@$*@($* intmax goop (or lack thereof in RELENG_6).
> 
> Affected files ...
> 
> .. //depot/projects/mjexp_6/sys/geom/multipath/g_multipath.c#2 edit
> 
> Differences ...
> 
> ==== //depot/projects/mjexp_6/sys/geom/multipath/g_multipath.c#2 (text+ko) ====
> 
> @@ -560,9 +560,15 @@
>  		return;
>  	}
>      	if (pp0->mediasize != pp1->mediasize) {
> -		gctl_error(req, "Provider %s has mediasize %zu; Provider %s "
> -		    "has mediasize %zu", pp0->name, (intmax_t) pp0->mediasize,
> +#if	__FreeBSD_version < 700000
> +		gctl_error(req, "Provider %s is %llu; Provider %s is %llu",
> +		    pp0->name, (unsigned long long) pp0->mediasize,
> +		    pp1->name, (unsigned long long) pp1->mediasize);
> +#else
> +		gctl_error(req, "Provider %s is %zu; Provider %s is %zu",
> +		    pp0->name, (intmax_t) pp0->mediasize,
>  		    pp1->name, (intmax_t) pp1->mediasize);
> +#endif
>  		return;
>  	}
>      	if (pp0->sectorsize != pp1->sectorsize) {
> 

I'm pretty sure this isn't right and you're seeing something else.
intmax_t has been around in the tree since at least 2002.  It is the
case that %zu is the wrong format for intmax_t. 'z' is the size_t
modifier.  For intmax_t you want 'j' instead.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/p4-projects/attachments/20061219/73e78876/attachment.pgp


More information about the p4-projects mailing list