*/
static void nfs_opendir_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
{
- READDIR3res *res;
+ READDIRPLUS3res *res;
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
- struct nfsdir *nfsdir = data->continue_data;;
+ struct nfsdir *nfsdir = data->continue_data;
- struct entry3 *entry;
+ struct entryplus3 *entry;
uint64_t cookie;
-
+
if (status == RPC_STATUS_ERROR) {
data->cb(-EFAULT, nfs, command_data, data->private_data);
nfs_free_nfsdir(nfsdir);
const char *nfs_get_export(struct nfs_context *nfs) {
return nfs->export;
}
+
+
+ #if defined(WIN32)
+ int poll(struct pollfd *fds, int nfsd, int timeout)
+ {
+ fd_set rfds, wfds, efds;
+ int ret;
+
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+ FD_ZERO(&efds);
+ if (fds->events & POLLIN) {
+ FD_SET(fds->fd, &rfds);
+ }
+ if (fds->events & POLLOUT) {
+ FD_SET(fds->fd, &wfds);
+ }
+ FD_SET(fds->fd, &efds);
+ select(fds->fd + 1, &rfds, &wfds, &efds, NULL);
+ fds->revents = 0;
+ if (FD_ISSET(fds->fd, &rfds)) {
+ fds->revents |= POLLIN;
+ }
+ if (FD_ISSET(fds->fd, &wfds)) {
+ fds->revents |= POLLOUT;
+ }
+ if (FD_ISSET(fds->fd, &efds)) {
+ fds->revents |= POLLHUP;
+ }
++ return 1;
+ }
+ #endif
+