From a2cf88983114837a0673a00f76d12232d1606e07 Mon Sep 17 00:00:00 2001 From: Cyril Hrubis Date: Wed, 25 Jun 2014 16:12:35 +0200 Subject: [PATCH] vmsplice.2: vmsplice() does not fail when nr_segs==0 This nr_segs==0 case is no-op; the call succeeds and no EINVAL error is returned. See fs/splice.c vmsplice syscall which contains: if (unlikely(nr_segs > UIO_MAXIOV)) return -EINVAL; else if (unlikely(!nr_segs)) return 0; And looking at the git log suggests that the code was always thus. Signed-off-by: Cyril Hrubis Signed-off-by: Michael Kerrisk --- man2/vmsplice.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/vmsplice.2 b/man2/vmsplice.2 index b184e27b5..ca1221ccf 100644 --- a/man2/vmsplice.2 +++ b/man2/vmsplice.2 @@ -133,7 +133,7 @@ either not valid, or doesn't refer to a pipe. .TP .B EINVAL .I nr_segs -is 0 or greater than +is greater than .BR IOV_MAX ; or memory not aligned if .B SPLICE_F_GIFT