extern struct pt_regs tile_regs;
#endif
-struct sysent {
+typedef struct sysent {
unsigned nargs;
int sys_flags;
int (*sys_func)();
const char *sys_name;
-};
+} struct_sysent;
-struct ioctlent {
+typedef struct ioctlent {
const char *doth;
const char *symbol;
unsigned long code;
-};
+} struct_ioctlent;
/* Trace Control Block */
struct tcb {
int curcol; /* Output column for this process */
FILE *outf; /* Output file for this process */
const char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */
- const struct sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */
+ const struct_sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */
struct timeval stime; /* System time usage as of last process wait */
struct timeval dtime; /* Delta for system time usage */
struct timeval etime; /* Syscall entry time */
extern const char *sprint_open_modes(mode_t);
extern void print_loff_t(struct tcb *, long);
-extern const struct ioctlent *ioctl_lookup(long);
-extern const struct ioctlent *ioctl_next_match(const struct ioctlent *);
+extern const struct_ioctlent *ioctl_lookup(long);
+extern const struct_ioctlent *ioctl_next_match(const struct_ioctlent *);
extern int ioctl_decode(struct tcb *, long, long);
extern int term_ioctl(struct tcb *, long, long);
extern int sock_ioctl(struct tcb *, long, long);
# define widen_to_long(v) ((long)(v))
#endif
-extern const struct sysent *sysent;
+extern const struct_sysent *sysent;
extern unsigned nsyscalls;
extern const char *const *errnoent;
extern unsigned nerrnos;
-extern const struct ioctlent *ioctlent;
+extern const struct_ioctlent *ioctlent;
extern unsigned nioctlents;
extern const char *const *signalent;
extern unsigned nsignals;
#define NF SYSCALL_NEVER_FAILS
#define MA MAX_ARGS
-static const struct sysent sysent0[] = {
+static const struct_sysent sysent0[] = {
#include "syscallent.h"
};
-#if SUPPORTED_PERSONALITIES >= 2
-static const struct sysent sysent1[] = {
+#if SUPPORTED_PERSONALITIES > 1
+static const struct_sysent sysent1[] = {
# include "syscallent1.h"
};
#endif
-#if SUPPORTED_PERSONALITIES >= 3
-static const struct sysent sysent2[] = {
+#if SUPPORTED_PERSONALITIES > 2
+static const struct_sysent sysent2[] = {
# include "syscallent2.h"
};
#endif
static const char *const signalent0[] = {
#include "signalent.h"
};
-static const struct ioctlent ioctlent0[] = {
+static const struct_ioctlent ioctlent0[] = {
#include "ioctlent.h"
};
enum { nsyscalls0 = ARRAY_SIZE(sysent0) };
enum { nioctlents0 = ARRAY_SIZE(ioctlent0) };
qualbits_t qual_flags0[MAX_QUALS];
-#if SUPPORTED_PERSONALITIES >= 2
+#if SUPPORTED_PERSONALITIES > 1
static const char *const errnoent1[] = {
# include "errnoent1.h"
};
static const char *const signalent1[] = {
# include "signalent1.h"
};
-static const struct ioctlent ioctlent1[] = {
+static const struct_ioctlent ioctlent1[] = {
# include "ioctlent1.h"
};
enum { nsyscalls1 = ARRAY_SIZE(sysent1) };
qualbits_t qual_flags1[MAX_QUALS];
#endif
-#if SUPPORTED_PERSONALITIES >= 3
+#if SUPPORTED_PERSONALITIES > 2
static const char *const errnoent2[] = {
# include "errnoent2.h"
};
static const char *const signalent2[] = {
# include "signalent2.h"
};
-static const struct ioctlent ioctlent2[] = {
+static const struct_ioctlent ioctlent2[] = {
# include "ioctlent2.h"
};
enum { nsyscalls2 = ARRAY_SIZE(sysent2) };
qualbits_t qual_flags2[MAX_QUALS];
#endif
-const struct sysent *sysent = sysent0;
+const struct_sysent *sysent = sysent0;
const char *const *errnoent = errnoent0;
const char *const *signalent = signalent0;
-const struct ioctlent *ioctlent = ioctlent0;
+const struct_ioctlent *ioctlent = ioctlent0;
unsigned nsyscalls = nsyscalls0;
unsigned nerrnos = nerrnos0;
unsigned nsignals = nsignals0;
qual_flags = qual_flags1;
break;
-# if SUPPORTED_PERSONALITIES >= 3
+# if SUPPORTED_PERSONALITIES > 2
case 2:
errnoent = errnoent2;
nerrnos = nerrnos2;
qual_flags0[n] |= bitflag;
}
-#if SUPPORTED_PERSONALITIES >= 2
+#if SUPPORTED_PERSONALITIES > 1
if (pers == 1 || pers < 0) {
if (not)
qual_flags1[n] &= ~bitflag;
}
#endif
-#if SUPPORTED_PERSONALITIES >= 3
+#if SUPPORTED_PERSONALITIES > 2
if (pers == 2 || pers < 0) {
if (not)
qual_flags2[n] &= ~bitflag;
rc = 0;
}
-#if SUPPORTED_PERSONALITIES >= 2
+#if SUPPORTED_PERSONALITIES > 1
for (i = 0; i < nsyscalls1; i++)
if (sysent1[i].sys_name &&
strcmp(s, sysent1[i].sys_name) == 0) {
}
#endif
-#if SUPPORTED_PERSONALITIES >= 3
+#if SUPPORTED_PERSONALITIES > 2
for (i = 0; i < nsyscalls2; i++)
if (sysent2[i].sys_name &&
strcmp(s, sysent2[i].sys_name) == 0) {
if (sysent0[i].sys_flags & n)
qualify_one(i, opt->bitflag, not, 0);
-#if SUPPORTED_PERSONALITIES >= 2
+#if SUPPORTED_PERSONALITIES > 1
for (i = 0; i < nsyscalls1; i++)
if (sysent1[i].sys_flags & n)
qualify_one(i, opt->bitflag, not, 1);
#endif
-#if SUPPORTED_PERSONALITIES >= 3
+#if SUPPORTED_PERSONALITIES > 2
for (i = 0; i < nsyscalls2; i++)
if (sysent2[i].sys_flags & n)
qualify_one(i, opt->bitflag, not, 2);
tcp->s_ent = &sysent[scno];
tcp->qual_flg = qual_flags[scno];
} else {
- static const struct sysent unknown = {
+ static const struct_sysent unknown = {
.nargs = MAX_ARGS,
.sys_flags = 0,
.sys_func = printargs,