install,dbus-manager: make unit_file_* take (char* const*) for strv

This commit is contained in:
Mike Yuan 2024-05-01 19:18:44 +08:00 committed by Luca Boccassi
parent 1ac0056cc2
commit e9e77e443d
3 changed files with 25 additions and 25 deletions

View file

@ -2425,7 +2425,7 @@ static int reply_install_changes_and_free(
static int method_enable_unit_files_generic( static int method_enable_unit_files_generic(
sd_bus_message *message, sd_bus_message *message,
Manager *m, Manager *m,
int (*call)(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char *files[], InstallChange **changes, size_t *n_changes), int (*call)(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char * const *files, InstallChange **changes, size_t *n_changes),
bool carries_install_info, bool carries_install_info,
sd_bus_error *error) { sd_bus_error *error) {
@ -2490,7 +2490,7 @@ static int method_link_unit_files(sd_bus_message *message, void *userdata, sd_bu
return method_enable_unit_files_generic(message, userdata, unit_file_link, /* carries_install_info = */ false, error); return method_enable_unit_files_generic(message, userdata, unit_file_link, /* carries_install_info = */ false, error);
} }
static int unit_file_preset_without_mode(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char **files, InstallChange **changes, size_t *n_changes) { static int unit_file_preset_without_mode(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char * const *files, InstallChange **changes, size_t *n_changes) {
return unit_file_preset(scope, flags, root_dir, files, UNIT_FILE_PRESET_FULL, changes, n_changes); return unit_file_preset(scope, flags, root_dir, files, UNIT_FILE_PRESET_FULL, changes, n_changes);
} }
@ -2550,7 +2550,7 @@ static int method_preset_unit_files_with_mode(sd_bus_message *message, void *use
static int method_disable_unit_files_generic( static int method_disable_unit_files_generic(
sd_bus_message *message, sd_bus_message *message,
Manager *m, Manager *m,
int (*call)(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char *files[], InstallChange **changes, size_t *n_changes), int (*call)(RuntimeScope scope, UnitFileFlags flags, const char *root_dir, char * const *files, InstallChange **changes, size_t *n_changes),
bool carries_install_info, bool carries_install_info,
sd_bus_error *error) { sd_bus_error *error) {

View file

@ -2306,7 +2306,7 @@ int unit_file_mask(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2349,7 +2349,7 @@ int unit_file_unmask(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2461,7 +2461,7 @@ int unit_file_link(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **files, char * const *files,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2563,7 +2563,7 @@ static int path_shall_revert(const LookupPaths *lp, const char *path) {
int unit_file_revert( int unit_file_revert(
RuntimeScope scope, RuntimeScope scope,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2720,7 +2720,7 @@ int unit_file_add_dependency(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags file_flags, UnitFileFlags file_flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
const char *target, const char *target,
UnitDependency dep, UnitDependency dep,
InstallChange **changes, InstallChange **changes,
@ -2792,7 +2792,7 @@ static int do_unit_file_enable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *config_path, const char *config_path,
char **names_or_paths, char * const *names_or_paths,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2823,7 +2823,7 @@ int unit_file_enable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names_or_paths, char * const *names_or_paths,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2849,7 +2849,7 @@ static int do_unit_file_disable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *config_path, const char *config_path,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2891,7 +2891,7 @@ int unit_file_disable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **files, char * const *files,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -2915,7 +2915,7 @@ int unit_file_disable(
static int normalize_linked_files( static int normalize_linked_files(
RuntimeScope scope, RuntimeScope scope,
const LookupPaths *lp, const LookupPaths *lp,
char **names_or_paths, char * const *names_or_paths,
char ***ret_names, char ***ret_names,
char ***ret_files) { char ***ret_files) {
@ -2974,7 +2974,7 @@ int unit_file_reenable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names_or_paths, char * const *names_or_paths,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -3491,7 +3491,7 @@ static int execute_preset(
InstallContext *minus, InstallContext *minus,
const LookupPaths *lp, const LookupPaths *lp,
const char *config_path, const char *config_path,
char **files, char * const *files,
UnitFilePresetMode mode, UnitFilePresetMode mode,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {
@ -3590,7 +3590,7 @@ int unit_file_preset(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags file_flags, UnitFileFlags file_flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
UnitFilePresetMode mode, UnitFilePresetMode mode,
InstallChange **changes, InstallChange **changes,
size_t *n_changes) { size_t *n_changes) {

View file

@ -106,28 +106,28 @@ int unit_file_enable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names_or_paths, char * const *names_or_paths,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_disable( int unit_file_disable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_reenable( int unit_file_reenable(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names_or_paths, char * const *names_or_paths,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_preset( int unit_file_preset(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
UnitFilePresetMode mode, UnitFilePresetMode mode,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
@ -142,27 +142,27 @@ int unit_file_mask(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_unmask( int unit_file_unmask(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_link( int unit_file_link(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **files, char * const *files,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_revert( int unit_file_revert(
RuntimeScope scope, RuntimeScope scope,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
InstallChange **changes, InstallChange **changes,
size_t *n_changes); size_t *n_changes);
int unit_file_set_default( int unit_file_set_default(
@ -180,7 +180,7 @@ int unit_file_add_dependency(
RuntimeScope scope, RuntimeScope scope,
UnitFileFlags flags, UnitFileFlags flags,
const char *root_dir, const char *root_dir,
char **names, char * const *names,
const char *target, const char *target,
UnitDependency dep, UnitDependency dep,
InstallChange **changes, InstallChange **changes,