return error("poll");
written = svmsplice(fd, &iov, 1, splice_flags);
+ *buf = iov.iov_base;
if (written < 0)
return error("vmsplice");
}
}
- if (!*buf)
- *buf = iov.iov_base;
return ret;
}
if (check_input_pipe())
return usage(argv[0]);
+ if (do_zeromap && !(splice_flags & SPLICE_F_MOVE)) {
+ fprintf(stderr, "zero map only valid for -m(ove)\n");
+ return usage(argv[0]);
+ }
+
if (!do_zeromap) {
buf = malloc(4096);
memset(buf, 0, 4096);