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

block: read procfs, not /etc/mtab #251

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

ffromani
Copy link
Collaborator

@ffromani ffromani commented May 16, 2021

Turns out /etc/mtab is long time deprecated, as it is documented
in the systemd docs: https://github.com/systemd/systemd/blob/v227/NEWS#L9-L14

Hence, better stop consuming it and read /proc/self/mounts (which
/etc/mtab is supposed to be a symlink of anyway) instead.

The format of the file is the same.

Signed-off-by: Francesco Romani fromani@redhat.com

@ffromani
Copy link
Collaborator Author

ffromani commented Jun 7, 2021

reason for this change: https://github.com/systemd/systemd/blob/v227/NEWS#L9-L14

@ffromani ffromani changed the title WIP: block: read procfs, not /etc/mtab block: read procfs, not /etc/mtab Jun 7, 2021
pkg/block/block_linux.go Outdated Show resolved Hide resolved
Turns out /etc/mtab is long time deprecated, as it is documented
in the systemd docs: https://github.com/systemd/systemd/blob/v227/NEWS#L9-L14

Hence, better stop consuming it and read `/proc/self/mounts` (which
/etc/mtab is supposed to be asymlink of anyway) instead.

The format of the file is the same.

Signed-off-by: Francesco Romani <fromani@redhat.com>
Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

thank you sir! :)

@jaypipes jaypipes merged commit 80140be into jaypipes:master Jun 8, 2021
@ffromani ffromani deleted the stop-reading-mtab branch November 23, 2021 07:12
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.

2 participants