Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong mask value in ioctl.h #256

Merged
merged 2 commits into from
Jul 4, 2023
Merged

Fix wrong mask value in ioctl.h #256

merged 2 commits into from
Jul 4, 2023

Conversation

adamdebek
Copy link
Contributor

JIRA: RTOS-476

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

include/sys/ioctl.h Outdated Show resolved Hide resolved
include/sys/ioctl.h Outdated Show resolved Hide resolved
@adamdebek
Copy link
Contributor Author

First 2 most significant bits indicate read/write followed by 14 size bits, but musk is only 13 bits.

@adamdebek adamdebek requested a review from nalajcie May 23, 2023 10:35
@nalajcie
Copy link
Member

hmm, maybe provide 2 commits:

  • first formatting the full file as required by clang-format
  • second with the necessary fix

include/sys/ioctl.h Show resolved Hide resolved
include/sys/ioctl.h Show resolved Hide resolved
@agkaminski
Copy link
Member

From what I see this stuff has been taken from openBSD and IOCPARM_MASK is 0x1fff there. It makes me think this change is wrong

@adamdebek
Copy link
Contributor Author

Yea, IOCPARM_MASK can remain 0x1fff (13 bits) but then IOC_VOID should be 0x2000000 so IN/OUT/VOID information is on 3 most significant bits of request.

@agkaminski
Copy link
Member

One commit is missing JIRA ID, you can use RTOS-374 for code formatting corrections

@adamdebek adamdebek merged commit 9da3f2b into master Jul 4, 2023
24 checks passed
@adamdebek adamdebek deleted the adamdebek/RTOS-476 branch July 4, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants