Bug 84985 - ioctl(TCSETS,...) doesn't report illegal values
ioctl(TCSETS,...) doesn't report illegal values
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alan Cox
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-24 13:26 EST by Ulrich Drepper
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-11 18:51:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ulrich Drepper 2003-02-24 13:26:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030221

Description of problem:
The POSIX standard requires that tcsetattr (implemented using ioctl on Linux)
reports invalid values in its parameters.  The Linux ioctl() implementation
instead works around them.  See

http://sources.redhat.com/ml/libc-alpha/2003-02/msg00117.html

for more details.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.call tcsetattr with invalid c_cflag valuses set
2.
3.
    

Additional info:
Comment 1 Roland McGrath 2003-02-24 15:06:09 EST
We need to examine the test suite to determine if there is really a bug here.
The POSIX.1 definition of tcsetattr says that tcsetattr should succeed if it
was able to make any of the changes, and fail with EINVAL only if it was not
able to make any of the change specified by the new struct termios at all.
So, if the test suite makes calls that change only some unsupported bits,
then it should get EINVAL.  But e.g. a call that sets the PARENB bit when
not supported by the device, and also changes some other bit like ICANON at
the same time must return success after changing only ICANON and not PARENB.

Note You need to log in before you can comment on or make changes to this bug.