struct_ioctlent mismatch

Dmitry V. Levin ldv at altlinux.org
Tue Jan 6 00:56:37 UTC 2015


On Mon, Jan 05, 2015 at 04:33:06PM -0800, enh wrote:
> looks like ioctlsort.c still generates struct initializers assuming:
> 
> struct ioctlent {
> const char* header;
> const char* name;
> unsigned long code;
> };
> 
> http://sourceforge.net/p/strace/code/ci/master/tree/ioctlsort.c#l8

Yes.

> but defs.h's struct_ioctlent (used by syscalls.c) only has two entries:
> 
> typedef struct ioctlent {
> const char *symbol;
> unsigned long code;
> } struct_ioctlent;
> 
> http://sourceforge.net/p/strace/code/ci/master/tree/defs.h#l397

Yes.

> there are two obvious fixes here, but i'm not sure which direction you
> intended to go :-)
> 
> oh, looks like you wanted to remove the field:
> 
> commit 3e252ca8352fc15e55bb6570bf90b38b877a1ae9
> Author: Dmitry V. Levin <ldv at altlinux.org>
> Date:   Mon Nov 3 20:37:39 2014 +0000
> 
>     Remove ioctl header file names from the executable
> 
>     * defs.h (struct ioctlent): Remove "doth" field.
>     * Makefile.am ($(ioctlent_h)): Remove 1st field.
> 
> in which case you'll want to remove the first field output by ioctlsort.c:

My idea was to remove the first field from the strace executable, and to
continue keeping this information for debug purposes in ioctlent.h.in
files.
This field is stripped when ioctlent.h is made from ioctlent.h.in files
by the change in Makefile.am you cited.


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


More information about the Strace-devel mailing list