Currently, we don't assign any meaning to that. Our current view
on virStream is that it's merely a pipe. And pipes don't support
seeking.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
goto label; \
} \
} while (0)
+# define virCheckPositiveArgReturn(argname, retval) \
+ do { \
+ if (argname <= 0) { \
+ virReportInvalidPositiveArg(argname); \
+ return retval; \
+ } \
+ } while (0)
# define virCheckNonZeroArgGoto(argname, label) \
do { \
if (argname == 0) { \
unsigned int flags)
{
virCheckFlags(0, -1);
+ virCheckPositiveArgReturn(length, -1);
/* Shouldn't happen, But it's better to safe than sorry. */
if (st->holeLength) {
int ret = -1;
virCheckFlags(0, -1);
+ virCheckPositiveArgReturn(length, -1);
virObjectLock(fdst);
if (fdst->length) {