From: Junio C Hamano Date: Thu, 9 Apr 2026 21:47:51 +0000 (-0700) Subject: Revert "sideband: use writev(3p) to send pktlines" X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74fbd8a571abe7b15de01956ba4599e500c31ac0;p=thirdparty%2Fgit.git Revert "sideband: use writev(3p) to send pktlines" This reverts commit 26986f4cbaf38d84a82b0b35da211389ce49552c; let's not use writev() for now. --- diff --git a/sideband.c b/sideband.c index 1ed6614eaf..ea7c25211e 100644 --- a/sideband.c +++ b/sideband.c @@ -264,7 +264,6 @@ void send_sideband(int fd, int band, const char *data, ssize_t sz, int packet_ma const char *p = data; while (sz) { - struct iovec iov[2]; unsigned n; char hdr[5]; @@ -274,19 +273,12 @@ void send_sideband(int fd, int band, const char *data, ssize_t sz, int packet_ma if (0 <= band) { xsnprintf(hdr, sizeof(hdr), "%04x", n + 5); hdr[4] = band; - iov[0].iov_base = hdr; - iov[0].iov_len = 5; + write_or_die(fd, hdr, 5); } else { xsnprintf(hdr, sizeof(hdr), "%04x", n + 4); - iov[0].iov_base = hdr; - iov[0].iov_len = 4; + write_or_die(fd, hdr, 4); } - - iov[1].iov_base = (void *) p; - iov[1].iov_len = n; - - writev_or_die(fd, iov, ARRAY_SIZE(iov)); - + write_or_die(fd, p, n); p += n; sz -= n; }