Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions fs/socket/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,23 @@ static int sock_file_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
static int sock_file_poll(FAR struct file *filep, struct pollfd *fds,
bool setup);
static int sock_file_truncate(FAR struct file *filep, off_t length);

/****************************************************************************
* Private Data
****************************************************************************/

static const struct file_operations g_sock_fileops =
{
sock_file_open, /* open */
sock_file_close, /* close */
sock_file_read, /* read */
sock_file_write, /* write */
NULL, /* seek */
sock_file_ioctl, /* ioctl */
NULL, /* mmap */
NULL, /* truncate */
sock_file_poll /* poll */
sock_file_open, /* open */
sock_file_close, /* close */
sock_file_read, /* read */
sock_file_write, /* write */
NULL, /* seek */
sock_file_ioctl, /* ioctl */
NULL, /* mmap */
sock_file_truncate, /* truncate */
sock_file_poll /* poll */
};

static struct inode g_sock_inode =
Expand Down Expand Up @@ -140,6 +141,11 @@ static int sock_file_poll(FAR struct file *filep, FAR struct pollfd *fds,
return psock_poll(filep->f_priv, fds, setup);
}

static int sock_file_truncate(FAR struct file *filep, off_t length)
{
return -EINVAL;
}

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down