Amit Walvekar(deleted)
|
SIOCGDRVSPEC ioctl: Operation not permitted
|
Amit Walvekar(deleted)
03/25/2019 6:56 AM
post119601
|
SIOCGDRVSPEC ioctl: Operation not permitted
Hello,
I am using Neutrino 7.0 on an RCAR H3 starter kit. I wanted to check the functionality of the ravb driver provided with
the BSP. The ioctl calls for driver specific commands return error code 103: Operation not permitted. I tried another
method in this forum using IOV's and MsgSendv_r but they return the same error aswell. Here is the code snippet i use.
int sock = socket(AF_UNIX, SOCK_DGRAM, IPPROTO_IP);
if (sock == -1) {
return -1;
};
struct ifdrv drv;
ptp_time_t ts;
drv.ifd_cmd = PTP_GET_TIME;
drv.ifd_len = sizeof(ts);
drv.ifd_data = &ts;
strcpy(drv.ifd_name,"ravb0");
int retVal = ioctl(sock, SIOCGDRVSPEC,&drv);
if(retVal)
{
cout << "error: " << errno << endl;
cout << strerror(errno) << endl;
}
I checked the driver code aswell and it supports the command.
Can you please help?
|
|
|