socketops: Return ENXIO for open() on sockets

This commit is contained in:
Sebastian Huber 2014-01-16 14:44:03 +01:00
parent f8d99e9665
commit b6c319bb7d

View File

@ -461,6 +461,13 @@ soo_close(struct file *fp, struct thread *td)
return (error); return (error);
} }
#ifdef __rtems__ #ifdef __rtems__
static int
rtems_bsd_soo_open(rtems_libio_t *iop, const char *path, int oflag,
mode_t mode)
{
return rtems_bsd_error_to_status_and_errno(ENXIO);
}
static int static int
rtems_bsd_soo_close(rtems_libio_t *iop) rtems_bsd_soo_close(rtems_libio_t *iop)
{ {
@ -486,7 +493,7 @@ rtems_bsd_soo_fcntl(rtems_libio_t *iop, int cmd)
} }
const rtems_filesystem_file_handlers_r socketops = { const rtems_filesystem_file_handlers_r socketops = {
.open_h = rtems_filesystem_default_open, .open_h = rtems_bsd_soo_open,
.close_h = rtems_bsd_soo_close, .close_h = rtems_bsd_soo_close,
.read_h = rtems_bsd_soo_read, .read_h = rtems_bsd_soo_read,
.write_h = rtems_bsd_soo_write, .write_h = rtems_bsd_soo_write,