]> granicus.if.org Git - strace/commitdiff
handle return values for ssisys on NSC
authorJohn Hughes <john@Calva.COM>
Thu, 18 Oct 2001 14:52:24 +0000 (14:52 +0000)
committerJohn Hughes <john@Calva.COM>
Thu, 18 Oct 2001 14:52:24 +0000 (14:52 +0000)
ChangeLog
system.c

index f0bf4b381f1a139ac11ebb2ac0b89b258e9b6ae8..45460f9caf919ceea159cd0ca2ced6112b2dd6bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-10-18  John Hughes  <john@Calva.COM>
+
+       * system.c(sys_ssisys): handle return values for ssisys
+
 2001-10-18  John Hughes  <john@Calva.COM>
 
        * signal.c: handle sigwait
index ef4e0e4d69f0b43a89b8234b016894afdb1633cd..f56f4235bdd652805b4980c56a05f1868bce6c0e 100644 (file)
--- a/system.c
+++ b/system.c
@@ -2064,10 +2064,11 @@ int sys_ssisys (tcp)
 struct tcb *tcp;
 {
        struct ssisys_iovec iov;
-       
+       cls_nodeinfo_args_t cni;
+       clusternode_info_t info;
+
        if (entering (tcp)) {
                ts_reclaim_child_inargs_t trc;
-               cls_nodeinfo_args_t cni;
                if (tcp->u_arg[1] != sizeof iov ||
                    umove (tcp, tcp->u_arg[0], &iov) < 0)
                {
@@ -2101,13 +2102,31 @@ struct tcb *tcp;
                }
        }
        else {
+               if (tcp->u_arg[1] != sizeof iov ||
+                   umove (tcp, tcp->u_arg[0], &iov) < 0)
+                   goto done;
                switch (iov.tio_id.id_cmd) {
+                   case SSISYS_CLUSTERNODE_INFO:
+                       if (iov.tio_udatainlen != sizeof cni ||
+                           umove (tcp, (long) iov.tio_udatain, &cni) < 0)
+                               goto bad_out;
+                       if (cni.info_len != sizeof info || 
+                           iov.tio_udataoutlen != sizeof &info ||
+                           umove (tcp, (long) iov.tio_udataout, &info) < 0)
+                               goto bad_out;
+                       tprintf (", out={node=%ld, cpus=%d, online=%d}",
+                                info.node_num, info.node_totalcpus,
+                                info.node_onlinecpus);
+                       break;
+                       
                    default:
+                   bad_out:
                        if (iov.tio_udataoutlen) {
                                tprintf (", out=[/* %d bytes */]",
                                         iov.tio_udataoutlen);
                        }
                }
+           done:
                tprintf ("}, %ld", tcp->u_arg[1]);
        }
        return 0;