From 2d8b2c587152bfa3408d4920f07cbb865fd36dff Mon Sep 17 00:00:00 2001 From: John Hughes Date: Thu, 18 Oct 2001 14:52:24 +0000 Subject: [PATCH] handle return values for ssisys on NSC --- ChangeLog | 4 ++++ system.c | 23 +++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0bf4b38..45460f9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-10-18 John Hughes + + * system.c(sys_ssisys): handle return values for ssisys + 2001-10-18 John Hughes * signal.c: handle sigwait diff --git a/system.c b/system.c index ef4e0e4d..f56f4235 100644 --- 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; -- 2.40.0