tcp->currpers = personality;
# undef PERSONALITY_NAMES
-# if defined POWERPC64 || defined AARCH64 || defined TILE
-# define PERSONALITY_NAMES {"64 bit", "32 bit"}
-# elif defined X86_64
+# if defined X86_64
# define PERSONALITY_NAMES {"64 bit", "32 bit", "x32"}
# elif defined X32
# define PERSONALITY_NAMES {"x32", "32 bit"}
+# elif SUPPORTED_PERSONALITIES == 2
+# define PERSONALITY_NAMES {"64 bit", "32 bit"}
# endif
# ifdef PERSONALITY_NAMES
if (!qflag) {
opts->first = opts->step;
- if (opts->signo > 0)
- *signo = opts->signo;
- if (opts->rval != INJECT_OPTS_RVAL_DEFAULT && !arch_set_scno(tcp, -1))
+ if (opts->data.flags & INJECT_F_SIGNAL)
+ *signo = opts->data.signo;
+ if (opts->data.flags & INJECT_F_RETVAL && !arch_set_scno(tcp, -1))
tcp->flags |= TCB_TAMPERED;
return 0;
if (!opts)
return 0;
- if (opts->rval >= 0) {
+ if (opts->data.rval >= 0) {
kernel_long_t u_rval = tcp->u_rval;
- tcp->u_rval = opts->rval;
+ tcp->u_rval = opts->data.rval;
if (arch_set_success(tcp)) {
tcp->u_rval = u_rval;
} else {
tcp->u_error = 0;
}
} else {
- unsigned long new_error = -opts->rval;
+ unsigned long new_error = -opts->data.rval;
if (new_error != tcp->u_error && new_error <= MAX_ERRNO_VALUE) {
unsigned long u_error = tcp->u_error;