Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2010 22:17:24 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Jeff Roberson <jeff@FreeBSD.org>
Cc:        svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r211265 - in projects/ofed/head/sys: dev/hptmv kern sys
Message-ID:  <20100813221511.R12886@delplex.bde.org>
In-Reply-To: <201008130315.o7D3F2Yh077220@svn.freebsd.org>
References:  <201008130315.o7D3F2Yh077220@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Aug 2010, Jeff Roberson wrote:

> Log:
>   - Change sysctl arg2 to a intptr_t preserving the sign and expanding the
>     size so it can optionally hold a pointer.

> Modified: projects/ofed/head/sys/kern/kern_jail.c
> ==============================================================================
> --- projects/ofed/head/sys/kern/kern_jail.c	Fri Aug 13 03:14:08 2010	(r211264)
> +++ projects/ofed/head/sys/kern/kern_jail.c	Fri Aug 13 03:15:02 2010	(r211265)
> @@ -4166,7 +4166,7 @@ sysctl_jail_param(SYSCTL_HANDLER_ARGS)
> 		i = 0;
> 		return (SYSCTL_OUT(req, &i, sizeof(i)));
> 	case CTLTYPE_STRING:
> -		snprintf(numbuf, sizeof(numbuf), "%d", arg2);
> +		snprintf(numbuf, sizeof(numbuf), "%jd", arg2);
> 		return
> 		    (sysctl_handle_string(oidp, numbuf, sizeof(numbuf), req));
> 	case CTLTYPE_STRUCT:
>

intptr_t is logically different from intmax_t, and is physically different
on all 32-bit arches.

Bruce



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