[systemd-devel] [PATCH] core/cryptsetup: Add WantsMountFor option to enable fallback to password request for crypt mounts.
Lennart Poettering
lennart at poettering.net
Thu Jul 3 04:36:46 PDT 2014
On Sun, 25.05.14 12:39, Przemek Rudy (prudy1 at o2.pl) wrote:
> -Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path) {
> +Set *manager_get_units_need_mounts_for(Manager *m, const char *path,
> bool strong) {
Please don't invent new bools halfway. Please always use the same logic
here to discern the two kinds, i.e. the dep type enum.
> * them. It's a hashmap with a path string as key and a Set as
> - * value where Unit objects are contained. */
> - Hashmap *units_requiring_mounts_for;
> + * value where Unit objects are contained.
> + * [0] - map of required (strong) paths
> + * [1] - map of wanted (weak) paths */
> + Hashmap *units_need_mounts_for[2];
Please use two normal variables for this. Two isn't that many that you'd
need to defer to an array for this. Also, an array where we use
arbitrary numeric indexes for reference two different concepts is not
OK. If we do this, then we must have an enum to reference this. Also,
introducing a new numbering scheme, where we already have the dep type
as enum...
Generally, I still don't really feel that the usecase for this is strong
enough. Can you make a strong concise case why we want this? I am not
totally opposed, but I want to know why I merge this...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list