[PATCH 2/4] ioctl: add decoding for FS_IOC_FIEMAP

Dmitry V. Levin ldv at altlinux.org
Fri May 20 12:12:05 UTC 2016


On Wed, May 18, 2016 at 06:09:40PM -0400, jeffm at suse.com wrote:
[...]
> diff --git a/ioctl.c b/ioctl.c
> index d82af4b..f6ca2f0 100644
> --- a/ioctl.c
> +++ b/ioctl.c
> @@ -228,11 +228,20 @@ ioctl_decode(struct tcb *tcp)
>  {
>  	const unsigned int code = tcp->u_arg[1];
>  	const long arg = tcp->u_arg[2];
> +	int ret;
>  
>  	switch (_IOC_TYPE(code)) {
>  #if defined(ALPHA) || defined(POWERPC)
> -	case 'f': case 't': case 'T':
> +	case 'f':
> +		ret = file_ioctl(tcp, code, arg);
> +		if (ret != RVAL_DECODED)
> +			return ret;
> +	case 't'
> +	case 'T':
> +		return term_ioctl(tcp, code, arg);
>  #else /* !ALPHA */
> +	case 'f':
> +		return file_ioctl(tcp, code, arg);
>  	case 0x54:
>  #endif /* !ALPHA */
>  		return term_ioctl(tcp, code, arg);

This obviously makes gcc -Werror unhappy on !(ALPHA || POWERPC).
Try to configure build with --enable-gcc-Werror.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160520/e9e19fd1/attachment.bin>


More information about the Strace-devel mailing list