forked from systemd/systemd
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] main from systemd:main #378
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not needed anymore after recent refactoring.
boot_id is already passed by value, and hence copied. Since we don't apply const to function parameters that are copied anywhere else, let's drop the const here as well for consistency.
Let's always use ret, ret_data and ret_size for output arguments. size is better than length in this case because we're dealing with arbitrary, possibly binary, data and not strings.
blkid.h and gmessages.h both use const for arguments that are passed by value, which is pointless and triggers clang-tidy warnings, so exclude them from processing.
The definition will use i because of the macro, so let's use i in the declaration as well. We can't use DECLARE_STRING_TABLE_LOOKUP_TO_STRING() because sd-json.h is a libsystemd public header.
We already have the same argument name as used in the declarations available, let's use it so the declarations and definitions match.
Make sure these match the definition argument names.
Let's make sure clang-tidy doesn't complain on distributions without locale-gen.
Now that clang-tidy passes regardless of whether these options are enabled or not, let's stop configuring them explicitly
If we're doing foreign UID range copying, we're going to be joining a private user namespace before doing the copy. copy_tree() insists on keeping all UIDs/GIDs the same when copying. Hence, all the UIDs/GIDs of the files we're copying should be in the private UID range, which means they need to be owned by the foreign UID range and we always need to call mountfsd_mount_directory_fd(). So there's no point in having a fallback path if the source directory is not foreign UID range owned, we'd simply fail to copy it later. Hence, insist on the source directory being foreign UID range owned.
There's only one output parameter for all these functions, so let's just name it ret following the coding style.
Let's migrate all remaining callers of safe_fork() to pidref_safe_fork() and get rid of safe_fork().
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )