ioctl() in driver - VxWorks

This is a discussion on ioctl() in driver - VxWorks ; I am writing a driver. After calling "iosDrvInstall" and "iosDevInstall", "pciIntConnect", I tried to call the "open", "ioctl" and "read" in another app program. "open" succeeded and returned me a file descriptor; then I use this returned fd value to ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ioctl() in driver

  1. ioctl() in driver

    I am writing a driver. After calling "iosDrvInstall" and
    "iosDevInstall", "pciIntConnect", I tried to call the "open", "ioctl"
    and "read" in another app program. "open" succeeded and returned me a
    file descriptor; then I use this returned fd value to call "ioctl" but
    the ioctl failed. According to the vxWorks manual, ioctl returns
    "ERROR" when the fd is invalid. But I am just using the same fd that
    "open" returned. Is there anybody could help me with this? Thanks a lot!


  2. Re: ioctl() in driver

    Probably the ioctl operation you want is not supported on that fd (your
    driver?). Use perror() and see if you can get a more specific error
    indocation.


+ Reply to Thread