X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/c28c61993f654bd4b225537ea04effa5c4a5337f..70a778e57fbc29a2d2bc8976745a18f4edd1a03a:/regress/hcommon.c.m4?ds=inline diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4 index 4c1af7c..5d6f471 100644 --- a/regress/hcommon.c.m4 +++ b/regress/hcommon.c.m4 @@ -48,8 +48,17 @@ const struct Terrno Terrnos[]= { { 0, 0 } }; +static vbuf vbw; - +int Hwritev(int fd, const struct iovec *vector, size_t count) { + size_t i; + + vbw.used= 0; + for (i=0; iiov_base,vector->iov_len)) Tnomem(); + } + return Hwrite(fd,vbw.buf,vbw.used); +} m4_define(`hm_syscall', ` hm_create_proto_q @@ -75,12 +84,16 @@ void Q$1(hm_args_massage($3,void)) { } else { Tvba(" $'`1=F_GETFL"); }') - m4_define(`hm_arg_addr_in', `Tvbaddr($'`1,$'`2);') - m4_define(`hm_arg_bytes_in', `Tvbbytes($'`2,$'`4);') + m4_define(`hm_arg_addr_in', `Tvba(" $'`1="); Tvbaddr($'`1,$'`2);') + m4_define(`hm_arg_bytes_in', `') m4_define(`hm_arg_bytes_out', `Tvbf(" $'`4=%lu",(unsigned long)$'`4);') m4_define(`hm_arg_addr_out', `Tvbf(" *$'`2=%d",$'`2);') $3 + hm_create_nothing + m4_define(`hm_arg_bytes_in', `Tvbbytes($'`2,$'`4);') + $3 + Q_vb(); } ') @@ -106,6 +119,7 @@ void Tvbbytes(const void *buf, int len) { else if (!(i&3)) Tvba(" "); Tvbf("%02x",*bp); } + Tvba("."); } void Tvbfdset(int max, const fd_set *fds) { @@ -169,8 +183,3 @@ void Tnomem(void) { void Toutputerr(void) { Tfailed("write error on test harness output"); } - -void Tensureoutputfile(void) { - /* fixme: allow sending it elsewhere */ - Toutputfile= stdout; -}