struct_ioctlent mismatch

enh enh at google.com
Tue Jan 6 00:33:06 UTC 2015


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


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

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:

diff --git a/ioctlsort.c b/ioctlsort.c
index 393b534..bf3a8ea 100644
--- a/ioctlsort.c
+++ b/ioctlsort.c
@@ -51,8 +51,8 @@ int main(int argc, char** argv) {
  for (i = 0; i < nioctls; i++)
  if (i == 0 || ioctls[i-1].code != ioctls[i].code ||
     is_not_prefix(ioctls[i-1].name, ioctls[i].name))
- printf("\t{\"%s\",\t\"%s\",\t%#06lx},\n",
- ioctls[i].header, ioctls[i].name, ioctls[i].code);
+ printf("\t{\"%s\",\t%#06lx},\n",
+ ioctls[i].name, ioctls[i].code);

  return 0;
 }

 --elliott




More information about the Strace-devel mailing list