Changeset 06ad80c in rtems-libbsd


Ignore:
Timestamp:
Dec 13, 2013, 3:14:43 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
b49921e
Parents:
e10d1cd
git-author:
Sebastian Huber <sebastian.huber@…> (12/13/13 15:14:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/16/13 14:35:51)
Message:

SOCKET(2): Add some FCNTL(2) support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/kern/sys_socket.c

    re10d1cd r06ad80c  
    471471}
    472472
     473static int
     474rtems_bsd_soo_fcntl(rtems_libio_t *iop, int cmd)
     475{
     476        int error = 0;
     477
     478        if (cmd == F_SETFL) {
     479                struct file *fp = rtems_bsd_iop_to_fp(iop);
     480                int nbio = iop->flags & LIBIO_FLAGS_NO_DELAY;
     481
     482                error = soo_ioctl(fp, FIONBIO, &nbio, NULL, NULL);
     483        }
     484
     485        return rtems_bsd_error_to_status_and_errno(error);
     486}
     487
    473488const rtems_filesystem_file_handlers_r socketops = {
    474489        .open_h = rtems_filesystem_default_open,
     
    482497        .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
    483498        .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    484         .fcntl_h = rtems_filesystem_default_fcntl,
     499        .fcntl_h = rtems_bsd_soo_fcntl,
    485500        .poll_h = rtems_bsd_soo_poll,
    486501        .kqfilter_h = rtems_bsd_soo_kqfilter
Note: See TracChangeset for help on using the changeset viewer.