On 2014-11-15 12:25, Maxim Uvarov wrote:
> On 11/14/2014 10:50 PM, Mike Holmes wrote:
> >>+ ret = ioctl(sockfd, SIOCSIFMTU, (caddr_t)&ifr);
> >>>+ if (ret) {
> > From the ioctl man page
> >Usually, on success zero is returned. A few ioctl() requests use the
> > return value as an output parameter and return a nonnegative value on
> > success. On error, -1 is returned, and errno is set appropriately.
> >
> >So in this case you need to check for (-1==ret)
> >
>
> Mike, yes I saw that. But I don't think it's needed for ioctls which I'm
> using here. I.e. for SIOCSIFMTU and other. I want them to return 0. Any
> other value is error for that ioctls.
Every person that reads this will wounder why you check for different
for zero instead of different from -1.
Be complient with the ioctl manpage please.
Cheers,
Anders
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp