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/posix-fdtab: Export fdtab init priority #1231

Conversation

StefanJum
Copy link
Member

Commit 9dc2701 changed the fdtab init priority and removed the macro that exported it. lib/devfs/ however uses the fdtab init priority to register it's own devices, calling
uk_rootfs_initcall_prio(..., UK_PRIO_AFTER(UK_LIBPOSIX_FDTAB_PRIO)), resulting in the devfs devices not being registered at all.

Reintroduce the macro used to export the fdtab init priority and set it to UK_PRIO_EARLIEST.

Prerequisite checklist

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

Additional configuration

You can see issue #31 on the catalog repo.
Adding this line access_log /dev/stdout; in the nginx config file will lead to an error:

open() "/dev/stdout" failed (22: Unknown error)

Commit 9dc2701 changed the fdtab init priority and removed the macro
that exported it. `lib/devfs/` however uses the `fdtab` init priority to
register it's own devices, calling
`uk_rootfs_initcall_prio(..., UK_PRIO_AFTER(UK_LIBPOSIX_FDTAB_PRIO))`,
resulting in the `devfs` devices not being registered at all.

Reintroduce the macro used to export the fdtab init priority and set it
to `UK_PRIO_EARLIEST`.

Signed-off-by: Stefan Jumarea <[email protected]>
@StefanJum StefanJum added kind/bug Something isn't working lib/devfs devfs file system bug/runtime Bug occurs during runtime labels Dec 28, 2023
@StefanJum StefanJum requested review from a team as code owners December 28, 2023 11:30
@StefanJum StefanJum removed request for a team December 28, 2023 11:30
@razvand razvand self-requested a review December 29, 2023 10:31
@razvand razvand added this to the v0.16.0 (Telesto) milestone Dec 29, 2023
@razvand razvand added area/lib Internal Unikraft Microlibrary kind/quick-fix Issue is a quick fix lang/c Issues or PRs to do with C/C++ lib/posix-fdtab Library to hande file descriptor table with a POSIX-compatible interface labels Dec 31, 2023
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.

Reviewed-by: Razvan Deaconescu [email protected]
Approved-by: Razvan Deaconescu [email protected]

@razvand razvand changed the base branch from staging to staging-1231 December 31, 2023 17:03
@razvand razvand merged commit e555f15 into unikraft:staging-1231 Dec 31, 2023
13 checks passed
razvand pushed a commit that referenced this pull request Dec 31, 2023
Commit 9dc2701 changed the fdtab init priority and removed the macro
that exported it. `lib/devfs/` however uses the `fdtab` init priority to
register it's own devices, calling
`uk_rootfs_initcall_prio(..., UK_PRIO_AFTER(UK_LIBPOSIX_FDTAB_PRIO))`,
resulting in the `devfs` devices not being registered at all.

Reintroduce the macro used to export the fdtab init priority and set it
to `UK_PRIO_EARLIEST`.

Signed-off-by: Stefan Jumarea <[email protected]>
Approved-by: Razvan Deaconescu <[email protected]>
Reviewed-by: Razvan Deaconescu <[email protected]>
GitHub-Closes: #1231
@razvand razvand deleted the StefanJum/add-posix-fdtab-prio-macro branch December 31, 2023 17:05
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/runtime Bug occurs during runtime kind/bug Something isn't working kind/quick-fix Issue is a quick fix lang/c Issues or PRs to do with C/C++ lib/devfs devfs file system lib/posix-fdtab Library to hande file descriptor table with a POSIX-compatible interface
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

2 participants