ports/126232: Linux ioctl TCGETS (0x5401)

Chagin Dmitry chagin.dmitry at gmail.com
Tue Aug 5 16:30:09 UTC 2008


The following reply was made to PR ports/126232; it has been noted by GNATS.

From: Chagin Dmitry <chagin.dmitry at gmail.com>
To: bug-followup at freebsd.org, yuri at tsoft.com
Cc: dchagin at freebsd.org
Subject: Re: ports/126232: Linux ioctl TCGETS (0x5401)
Date: Tue, 5 Aug 2008 20:27:44 +0400 (MSD)

 >
 >  Description:
 >  I've ran ktrace(1) on some Linux application and noticed that it has a
 >  lot calls like this:
 >  97754 app CALL linux_ioctl(0xf,0x5401 ,0xbfbfbc78)
 >  97754 app RET linux_ioctl -1 errno 25 Inappropriate ioctl for device
 >  0x5401 stands for TCGETS on Linux. As I understand this ioctl is
 >  obsolete
 >  and is replaced by tcgetattr() (?).
 
 Actually it not absolutelly so, tcgetattr() it is a glibc function
 which uses ioctl TCGETS inside.
 
 
 >  It's better to not return errno but to do what tcgetattr() does.
 >  This will take out one more potential point of failure for some Linux
 >  apps.
 
 I think that the author should give more information, at least explain
 on what specifies a file descriptor.
 
 thnx!
 
 -- 
 Have fun!
 chd


More information about the freebsd-emulation mailing list