427 |
{ |
{ |
428 |
if (stream == NULL || stream->_get_fd == NULL) |
if (stream == NULL || stream->_get_fd == NULL) |
429 |
return EINVAL; |
return EINVAL; |
430 |
return stream->_get_fd (stream, pfd); |
return stream->_get_fd (stream, pfd, NULL); |
431 |
|
} |
432 |
|
|
433 |
|
int |
434 |
|
stream_get_fd2 (stream_t stream, int *pfd1, int *pfd2) |
435 |
|
{ |
436 |
|
if (stream == NULL || stream->_get_fd == NULL) |
437 |
|
return EINVAL; |
438 |
|
return stream->_get_fd (stream, pfd1, pfd2); |
439 |
} |
} |
440 |
|
|
441 |
int |
int |
552 |
} |
} |
553 |
|
|
554 |
int |
int |
555 |
stream_set_fd (stream_t stream, int (*_get_fd) (stream_t, int *), void *owner) |
stream_set_fd (stream_t stream, int (*_get_fd) (stream_t, int *, int *), |
556 |
|
void *owner) |
557 |
{ |
{ |
558 |
if (stream == NULL) |
if (stream == NULL) |
559 |
return EINVAL; |
return EINVAL; |