]> granicus.if.org Git - strace/commitdiff
Remove unused parsers of getmsg and putmsg
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Jul 2015 21:37:24 +0000 (21:37 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 20 Jul 2015 22:41:56 +0000 (22:41 +0000)
* stream.c [SPARC || SPARC64] (sys_putmsg, sys_getmsg): Remove.
Stop including "xlat/msgflags.h".
* xlat/msgflags.in: Remove.

stream.c
xlat/msgflags.in [deleted file]

index 4d8549ba59924a40b1b3f978429bda67ab1dfb7d..c21c73d08d0609846697a292bcf80bff16fbf70e 100644 (file)
--- a/stream.c
+++ b/stream.c
  * Linux hasn't. Solaris has (had?).
  * Just in case I miss something, retain in for Sparc...
  */
-#if defined(SPARC) || defined(SPARC64)
+#if (defined SPARC || defined SPARC64) \
+ && (defined SYS_putpmsg || defined SYS_getpmsg)
 
 # ifdef HAVE_STROPTS_H
 #  include <stropts.h>
 # else
-#  define RS_HIPRI 1
 struct strbuf {
        int     maxlen;                 /* no. of bytes in buffer */
        int     len;                    /* no. of bytes returned */
@@ -55,8 +55,6 @@ struct strbuf {
 #  define MOREDATA 2
 # endif
 
-#include "xlat/msgflags.h"
-
 static void
 printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting)
 {
@@ -86,70 +84,8 @@ printstrbufarg(struct tcb *tcp, long arg, int getting)
        tprints(", ");
 }
 
-SYS_FUNC(putmsg)
-{
-       int i;
-
-       if (entering(tcp)) {
-               /* fd */
-               tprintf("%ld, ", tcp->u_arg[0]);
-               /* control and data */
-               for (i = 1; i < 3; i++)
-                       printstrbufarg(tcp, tcp->u_arg[i], 0);
-               /* flags */
-               printflags(msgflags, tcp->u_arg[3], "RS_???");
-       }
-       return 0;
-}
-
-SYS_FUNC(getmsg)
-{
-       int i, flags;
-
-       if (entering(tcp)) {
-               /* fd */
-               tprintf("%lu, ", tcp->u_arg[0]);
-       } else {
-               if (syserror(tcp)) {
-                       tprintf("%#lx, %#lx, %#lx",
-                               tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
-                       return 0;
-               }
-               /* control and data */
-               for (i = 1; i < 3; i++)
-                       printstrbufarg(tcp, tcp->u_arg[i], 1);
-               /* pointer to flags */
-               if (tcp->u_arg[3] == 0)
-                       tprints("NULL");
-               else if (umove(tcp, tcp->u_arg[3], &flags) < 0)
-                       tprints("[?]");
-               else {
-                       tprints("[");
-                       printflags(msgflags, flags, "RS_???");
-                       tprints("]");
-               }
-               /* decode return value */
-               switch (tcp->u_rval) {
-               case MORECTL:
-                       tcp->auxstr = "MORECTL";
-                       break;
-               case MORECTL|MOREDATA:
-                       tcp->auxstr = "MORECTL|MOREDATA";
-                       break;
-               case MOREDATA:
-                       tcp->auxstr = "MORECTL";
-                       break;
-               default:
-                       tcp->auxstr = NULL;
-                       break;
-               }
-       }
-       return RVAL_HEX | RVAL_STR;
-}
-
-# if defined SYS_putpmsg || defined SYS_getpmsg
-#include "xlat/pmsgflags.h"
-#  ifdef SYS_putpmsg
+# include "xlat/pmsgflags.h"
+# ifdef SYS_putpmsg
 SYS_FUNC(putpmsg)
 {
        int i;
@@ -167,8 +103,8 @@ SYS_FUNC(putpmsg)
        }
        return 0;
 }
-#  endif
-#  ifdef SYS_getpmsg
+# endif
+# ifdef SYS_getpmsg
 SYS_FUNC(getpmsg)
 {
        int i, flags;
@@ -216,9 +152,7 @@ SYS_FUNC(getpmsg)
        }
        return RVAL_HEX | RVAL_STR;
 }
-#  endif
-# endif /* getpmsg/putpmsg */
-
+# endif
 #endif /* STREAMS syscalls support */
 
 
diff --git a/xlat/msgflags.in b/xlat/msgflags.in
deleted file mode 100644 (file)
index 62e6bb7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RS_HIPRI