/* Copyright (c) 2014-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "fdpass.h"
#include "istream-file-private.h"
#include "istream-unix.h"
struct unix_istream {
bool next_read_fd;
int read_fd;
};
static void
{
}
{
if (!ustream->next_read_fd)
return i_stream_file_read(stream);
return -2;
if (ret == 0) {
/* EOF */
return -1;
}
return 0;
} else {
/* if we get EBADF for a valid fd, it means something's
really wrong and we'd better just crash. */
return -1;
}
}
return ret;
}
{
return input;
}
{
}
{
}
{
int fd;
return fd;
}