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

Kernel/FileSystem: Small code cleanups #24760

Merged
merged 2 commits into from
Jul 27, 2024
Merged

Conversation

brody-qq
Copy link
Contributor

@brody-qq brody-qq commented Jul 19, 2024

This PR adds some small code cleanups to the FileSystem code.

The 2 commits do the following:

  • Update the placement of some const keywords to match the 'const placement' rule of the style guide.
  • Replace a hardcoded offset in the Ext2FS code with a constexpr

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Jul 19, 2024
@nico nico added ⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author ⚠️ pr-has-conflicts PR has merge conflicts and needs to be rebased ✅ pr-community-approved PR has been approved by a community member and removed 👀 pr-needs-review PR needs review from a maintainer or community member labels Jul 22, 2024
This moves 3 const keywords in OpenFileDescription::tty() to make them
consistent with the 'const placement' rule in the style guide.
The superblock of an ext2 filesystem is always found on the storage
device at offset 1024. This 1024 number was hardcoded in the Ext2FS
code.

This commit:
* adds a constexpr to replace the hardcoded 1024 values
* removes a comment about one of the the hardcoded 1024 values which is
  now umnecessary
@github-actions github-actions bot added 👀 pr-needs-review PR needs review from a maintainer or community member and removed ⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author ✅ pr-community-approved PR has been approved by a community member labels Jul 27, 2024
@brody-qq
Copy link
Contributor Author

I removed the StorageManagement.cpp commit since it conflicted with changes made in #22968

@brody-qq brody-qq changed the title Kernel/FileSystem+Storage: Small code cleanups Kernel/FileSystem: Small code cleanups Jul 27, 2024
@nico nico merged commit f3f681a into SerenityOS:master Jul 27, 2024
13 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ pr-has-conflicts PR has merge conflicts and needs to be rebased
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants