Commit 5c63462c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

decomp: fallback to write() if Linux vmsplice returns ENOSYS

(Since we are always dealing with a pipe, it cannot return EINVAL)
parent 7c321e8a
...@@ -120,9 +120,9 @@ static void *Thread (void *data) ...@@ -120,9 +120,9 @@ static void *Thread (void *data)
struct iovec iov = { buf + i, (len - i) & ~page_mask, }; struct iovec iov = { buf + i, (len - i) & ~page_mask, };
j = vmsplice (fd, &iov, 1, SPLICE_F_GIFT); j = vmsplice (fd, &iov, 1, SPLICE_F_GIFT);
} }
#else if (j == -1 && errno == ENOSYS) /* vmsplice() not supported */
j = write (fd, buf + i, len - i);
#endif #endif
j = write (fd, buf + i, len - i);
if (j <= 0) if (j <= 0)
{ {
if (j == 0) if (j == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment