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 <chrubis@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Cyril Hrubis 2014-06-25 16:12:35 +02:00 committed by Michael Kerrisk
parent 94b2c093a4
commit a2cf889831
1 changed files with 1 additions and 1 deletions

View File

@ -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