One problem about ioctl during porting from Solaris to Linux

From: Gavin Yu (songtaoyu_at_lucent.com)
Date: 09/22/05


Date: Thu, 22 Sep 2005 17:08:24 +0800

Hi,

During porting one application from Solaris to Linux, we encountered one
problem about the function iotcl.
Our codes are as below:
===============================================================
        if (ioctl(4, I_PUSH, "ptem") < 0) {
            printf(" Error\n");
        }
===============================================================

we found the return value of ioctl is always <0.
Could anyone tell us how to deal with this issue? Is there any replacement
on Linux?

Thanks in advance!

Yu



Relevant Pages