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

lib/vfscore: Fix fget in flock() #472

Conversation

marcrittinghaus
Copy link
Member

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.pl on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): [N/A]
  • Platform(s): [N/A]
  • Application(s): [N/A]

Additional configuration

Description of changes

fget returns a non-zero value on error, 0 otherwise. This commit fixes the wrong check in flock, which assumes the opposite. It also takes the error value from fget.

fget returns a non-zero value on error, 0 otherwise. This commit fixes
the wrong check in flock, which assumes the opposite. It also takes the
error value from fget.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
@marcrittinghaus marcrittinghaus added area/lib Internal Unikraft Microlibrary lib/vfscore VFS Core Interface bug/fix This PR fixes a bug labels Jun 10, 2022
@marcrittinghaus marcrittinghaus added this to the v0.9.0 (Hyperion) milestone Jun 10, 2022
@marcrittinghaus marcrittinghaus requested a review from a team as a code owner June 10, 2022 11:37
Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

Reviewed-by: Marco Schlumpp marco.schlumpp@gmail.com

@unikraft-bot
Copy link
Member

Checkpatch passed

Beep boop! I ran Unikraft's checkpatch.pl support script on your pull request and it all looks good!

SHA commit checkpatch
e79df22 lib/vfscore: Fix fget in flock()

Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Thanks, @marcrittinghaus !

Approved-by: Razvan Deaconescu razvan.deaconescu@cs.pub.ro

@razvand razvand removed the request for review from a team June 10, 2022 13:25
@unikraft-bot unikraft-bot added the ci/merged Merged by CI label Jun 10, 2022
@marcrittinghaus marcrittinghaus deleted the mritting/pr_fix_flock branch July 20, 2022 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lib Internal Unikraft Microlibrary bug/fix This PR fixes a bug ci/merged Merged by CI lib/vfscore VFS Core Interface
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants