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

Improve error messages #4035

Merged
merged 2 commits into from
Mar 3, 2021
Merged

Improve error messages #4035

merged 2 commits into from
Mar 3, 2021

Conversation

Tomin1
Copy link
Contributor

@Tomin1 Tomin1 commented Mar 3, 2021

I sent some changes recently (#3998) and now I noticed that there were some minor things that could have been better.

The first commit moves error message of missing directory while mounting after debug logging so that it's easy to see when the error happens and adds a cause message. The second commit changes %m usages introduced by the changes I made. While %m is reentrant and allows very nice and clean code, it's not consistent with the rest of firejail and also not portable across libc implementations.

Move error message after debug logging and add cause message.

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
Better for portability and consistency. Currently strerror() is used
everywhere else, so use it here as well. printf's %m is a glibc
extension that is supported also by some other libc implementations.

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
@reinerh reinerh merged commit 0672a2e into netblue30:master Mar 3, 2021
@reinerh
Copy link
Collaborator

reinerh commented Mar 3, 2021

Thanks!

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