Remove code which is not used on Linux
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 18 Mar 2012 03:16:59 +0000 (04:16 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 18 Mar 2012 03:16:59 +0000 (04:16 +0100)
Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686,
mipsel,mips,x86_64

* syscall.c: Remove code which handles RVAL_Lfoo constants.
* defs.h: Remove struct tcb::u_lrval member - it is never set.
Remove RVAL_Lfoo constants which signify return of "long" result -
they are never used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
defs.h
syscall.c

diff --git a/defs.h b/defs.h
index a91e196d0e754a85ee9841243206ba11acc20068..e9df327bb0139429530574f122b464f56a313ba8 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -312,9 +312,6 @@ struct tcb {
        long long ext_arg[MAX_ARGS];    /* System call arguments */
 #endif
        long u_rval;            /* (first) return value */
-#ifdef HAVE_LONG_LONG
-       long long u_lrval;      /* long long return value */
-#endif
        int ptrace_errno;
 #if SUPPORTED_PERSONALITIES > 1
        int currpers;           /* Personality at the time of scno update */
@@ -406,11 +403,7 @@ extern const struct xlat open_access_modes[];
 #define RVAL_HEX       001     /* hex format */
 #define RVAL_OCTAL     002     /* octal format */
 #define RVAL_UDECIMAL  003     /* unsigned decimal format */
-#define RVAL_LDECIMAL  004     /* long decimal format */
-#define RVAL_LHEX      005     /* long hex format */
-#define RVAL_LOCTAL    006     /* long octal format */
-#define RVAL_LUDECIMAL 007     /* long unsigned decimal format */
-#define RVAL_MASK      007     /* mask for these values */
+#define RVAL_MASK      003     /* mask for these values */
 
 #define RVAL_STR       010     /* Print `auxstr' field after return val */
 #define RVAL_NONE      020     /* Print nothing */
index 6737f287d119f7d8483c97c4cf7c3b8cea3485da..272e3a0dcc7fc8186e555690094df5f9e6c6deed 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -2033,20 +2033,6 @@ trace_syscall_exiting(struct tcb *tcp)
                        case RVAL_DECIMAL:
                                tprintf("= %ld", tcp->u_rval);
                                break;
-#ifdef HAVE_LONG_LONG
-                       case RVAL_LHEX:
-                               tprintf("= %#llx", tcp->u_lrval);
-                               break;
-                       case RVAL_LOCTAL:
-                               tprintf("= %#llo", tcp->u_lrval);
-                               break;
-                       case RVAL_LUDECIMAL:
-                               tprintf("= %llu", tcp->u_lrval);
-                               break;
-                       case RVAL_LDECIMAL:
-                               tprintf("= %lld", tcp->u_lrval);
-                               break;
-#endif
                        default:
                                fprintf(stderr,
                                        "invalid rval format\n");