Lines Matching refs:changes
263 UnitFileChange **changes, in unit_file_changes_add() argument
272 assert(!changes == !n_changes); in unit_file_changes_add()
279 if (!changes) in unit_file_changes_add()
282 c = reallocarray(*changes, *n_changes + 1, sizeof(UnitFileChange)); in unit_file_changes_add()
285 *changes = c; in unit_file_changes_add()
312 void unit_file_changes_free(UnitFileChange *changes, size_t n_changes) { in unit_file_changes_free() argument
313 assert(changes || n_changes == 0); in unit_file_changes_free()
316 free(changes[i].path); in unit_file_changes_free()
317 free(changes[i].source); in unit_file_changes_free()
320 free(changes); in unit_file_changes_free()
323 void unit_file_dump_changes(int r, const char *verb, const UnitFileChange *changes, size_t n_change… in unit_file_dump_changes() argument
326 assert(changes || n_changes == 0); in unit_file_dump_changes()
331 assert(verb || changes[i].type_or_errno >= 0); in unit_file_dump_changes()
333 switch (changes[i].type_or_errno) { in unit_file_dump_changes()
337 changes[i].path, in unit_file_dump_changes()
339 changes[i].source); in unit_file_dump_changes()
343 log_info("Removed \"%s\".", changes[i].path); in unit_file_dump_changes()
347 log_info("Unit %s is masked, ignoring.", changes[i].path); in unit_file_dump_changes()
352 changes[i].path); in unit_file_dump_changes()
357 changes[i].source, changes[i].path); in unit_file_dump_changes()
361 … log_warning("Failed to enable auxiliary unit %s, ignoring.", changes[i].source); in unit_file_dump_changes()
364 if (changes[i].source) in unit_file_dump_changes()
365 err = log_error_errno(changes[i].type_or_errno, in unit_file_dump_changes()
367 verb, changes[i].path, changes[i].source); in unit_file_dump_changes()
369 err = log_error_errno(changes[i].type_or_errno, in unit_file_dump_changes()
371 verb, changes[i].path); in unit_file_dump_changes()
374 … err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, unit %s is masked.", in unit_file_dump_changes()
375 verb, changes[i].path); in unit_file_dump_changes()
378 …err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, unit %s is transient or genera… in unit_file_dump_changes()
379 verb, changes[i].path); in unit_file_dump_changes()
382 … err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, invalid specifier in \"%s\".", in unit_file_dump_changes()
383 verb, changes[i].path); in unit_file_dump_changes()
386 …err = log_error_errno(changes[i].type_or_errno, "Failed to %s %s, destination unit %s is a non-tem… in unit_file_dump_changes()
387 verb, changes[i].source, changes[i].path); in unit_file_dump_changes()
390 err = log_error_errno(changes[i].type_or_errno, in unit_file_dump_changes()
392 verb, changes[i].path); in unit_file_dump_changes()
395 …err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, refusing to operate on linked … in unit_file_dump_changes()
396 verb, changes[i].path); in unit_file_dump_changes()
399 if (changes[i].source) in unit_file_dump_changes()
400 … err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, cannot alias %s as %s.", in unit_file_dump_changes()
401 verb, changes[i].source, changes[i].path); in unit_file_dump_changes()
403 …err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, invalid unit reference \"%s\".… in unit_file_dump_changes()
404 verb, changes[i].path); in unit_file_dump_changes()
407 … err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, unit %s does not exist.", in unit_file_dump_changes()
408 verb, changes[i].path); in unit_file_dump_changes()
411 …err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, cannot resolve specifiers in \… in unit_file_dump_changes()
412 verb, changes[i].path); in unit_file_dump_changes()
415 assert(changes[i].type_or_errno < 0); in unit_file_dump_changes()
416 … err = log_error_errno(changes[i].type_or_errno, "Failed to %s unit, file \"%s\": %m", in unit_file_dump_changes()
417 verb, changes[i].path); in unit_file_dump_changes()
481 UnitFileChange **changes, in create_symlink() argument
505 unit_file_changes_add(changes, n_changes, UNIT_FILE_SYMLINK, new_path, old_path); in create_symlink()
510 unit_file_changes_add(changes, n_changes, -errno, new_path, NULL); in create_symlink()
520 unit_file_changes_add(changes, n_changes, r, new_path, NULL); in create_symlink()
530 unit_file_changes_add(changes, n_changes, -EEXIST, new_path, dest); in create_symlink()
536 unit_file_changes_add(changes, n_changes, r, new_path, NULL); in create_symlink()
540 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, new_path, NULL); in create_symlink()
541 unit_file_changes_add(changes, n_changes, UNIT_FILE_SYMLINK, new_path, old_path); in create_symlink()
582 UnitFileChange **changes, in remove_marked_symlinks_fd() argument
626 …ked_symlinks_fd(remove_symlinks_to, nfd, p, config_path, lp, dry_run, restart, changes, n_changes); in remove_marked_symlinks_fd()
667 unit_file_changes_add(changes, n_changes, q, p, NULL); in remove_marked_symlinks_fd()
687 unit_file_changes_add(changes, n_changes, -errno, p, NULL); in remove_marked_symlinks_fd()
694 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, p, NULL); in remove_marked_symlinks_fd()
715 UnitFileChange **changes, in remove_marked_symlinks() argument
741 …s_fd(remove_symlinks_to, cfd, config_path, config_path, lp, dry_run, &restart, changes, n_changes); in remove_marked_symlinks()
1072 UnitFileChange **changes, in install_info_may_process() argument
1081 unit_file_changes_add(changes, n_changes, -ERFKILL, i->path, NULL); in install_info_may_process()
1086 unit_file_changes_add(changes, n_changes, -EADDRNOTAVAIL, i->path, NULL); in install_info_may_process()
1727 UnitFileChange **changes, in install_info_discover() argument
1742 unit_file_changes_add(changes, n_changes, r, name, NULL); in install_info_discover()
1752 UnitFileChange **changes, in install_info_discover_and_check() argument
1757 r = install_info_discover(ctx, lp, name, flags, ret, changes, n_changes); in install_info_discover_and_check()
1761 return install_info_may_process(ret ? *ret : NULL, lp, changes, n_changes); in install_info_discover_and_check()
1768 UnitFileChange **changes, in unit_file_verify_alias() argument
1803 unit_file_changes_add(changes, n_changes, -EXDEV, dst, NULL); in unit_file_verify_alias()
1811 unit_file_changes_add(changes, n_changes, -EXDEV, dst, NULL); in unit_file_verify_alias()
1823 unit_file_changes_add(changes, n_changes, -EXDEV, dst, info->name); in unit_file_verify_alias()
1837 … unit_file_changes_add(changes, n_changes, -EUCLEAN, info->name, NULL); in unit_file_verify_alias()
1853 unit_file_changes_add(changes, n_changes, in unit_file_verify_alias()
1871 UnitFileChange **changes, in install_info_symlink_alias() argument
1885 unit_file_changes_add(changes, n_changes, q, *s, NULL); in install_info_symlink_alias()
1890 q = unit_file_verify_alias(info, dst, &dst_updated, changes, n_changes); in install_info_symlink_alias()
1902 q = create_symlink(lp, info->path, alias_path, force, changes, n_changes); in install_info_symlink_alias()
1917 UnitFileChange **changes, in install_info_symlink_wants() argument
1956 unit_file_changes_add(changes, n_changes, -ERFKILL, path, NULL); in install_info_symlink_wants()
1975 unit_file_changes_add(changes, n_changes, q, *s, NULL); in install_info_symlink_wants()
1991 unit_file_changes_add(changes, n_changes, -EIDRM, dst, n); in install_info_symlink_wants()
1994 unit_file_changes_add(changes, n_changes, -EUCLEAN, dst, NULL); in install_info_symlink_wants()
2005 q = create_symlink(lp, info->path, path, true, changes, n_changes); in install_info_symlink_wants()
2010 … unit_file_changes_add(changes, n_changes, UNIT_FILE_DESTINATION_NOT_PRESENT, dst, info->path); in install_info_symlink_wants()
2021 UnitFileChange **changes, in install_info_symlink_link() argument
2042 return create_symlink(lp, info->path, path, force, changes, n_changes); in install_info_symlink_link()
2051 UnitFileChange **changes, in install_info_apply() argument
2065 r = install_info_symlink_link(info, lp, config_path, force, changes, n_changes); in install_info_apply()
2072 r = install_info_symlink_alias(scope, info, lp, config_path, force, changes, n_changes); in install_info_apply()
2074 …nk_wants(scope, file_flags, info, lp, config_path, info->wanted_by, ".wants/", changes, n_changes); in install_info_apply()
2078 …nts(scope, file_flags, info, lp, config_path, info->required_by, ".requires/", changes, n_changes); in install_info_apply()
2091 UnitFileChange **changes, in install_context_apply() argument
2119 … q = unit_file_changes_add(changes, n_changes, UNIT_FILE_AUXILIARY_FAILED, NULL, i->name); in install_context_apply()
2125 unit_file_changes_add(changes, n_changes, q, i->name, NULL); in install_context_apply()
2132 … unit_file_changes_add(changes, n_changes, UNIT_FILE_IS_MASKED, i->path, NULL); in install_context_apply()
2143 … q = install_info_apply(ctx->scope, file_flags, i, lp, config_path, changes, n_changes); in install_context_apply()
2160 UnitFileChange **changes, in install_context_mark_for_removal() argument
2188 … unit_file_changes_add(changes, n_changes, UNIT_FILE_IS_DANGLING, i->path ?: i->name, NULL); in install_context_mark_for_removal()
2195 … unit_file_changes_add(changes, n_changes, r, i->path ?: i->name, NULL); in install_context_mark_for_removal()
2200 unit_file_changes_add(changes, n_changes, r, i->path ?: i->name, NULL); in install_context_mark_for_removal()
2203 … unit_file_changes_add(changes, n_changes, UNIT_FILE_IS_MASKED, i->path ?: i->name, NULL); in install_context_mark_for_removal()
2223 UnitFileChange **changes, in unit_file_mask() argument
2255 … q = create_symlink(&lp, "/dev/null", path, flags & UNIT_FILE_FORCE, changes, n_changes); in unit_file_mask()
2268 UnitFileChange **changes, in unit_file_unmask() argument
2334 unit_file_changes_add(changes, n_changes, -errno, path, NULL); in unit_file_unmask()
2340 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, path, NULL); in unit_file_unmask()
2348 … q = remove_marked_symlinks(remove_symlinks_to, config_path, &lp, dry_run, changes, n_changes); in unit_file_unmask()
2360 UnitFileChange **changes, in unit_file_link() argument
2428 q = create_symlink(&lp, *i, new_path, flags & UNIT_FILE_FORCE, changes, n_changes); in unit_file_link()
2459 UnitFileChange **changes, in unit_file_revert() argument
2584 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, t, NULL); in unit_file_revert()
2587 unit_file_changes_add(changes, n_changes, UNIT_FILE_UNLINK, *i, NULL); in unit_file_revert()
2595 … q = remove_marked_symlinks(remove_symlinks_to, lp.runtime_config, &lp, false, changes, n_changes); in unit_file_revert()
2599 …q = remove_marked_symlinks(remove_symlinks_to, lp.persistent_config, &lp, false, changes, n_change… in unit_file_revert()
2613 UnitFileChange **changes, in unit_file_add_dependency() argument
2641 &target_info, changes, n_changes); in unit_file_add_dependency()
2651 &info, changes, n_changes); in unit_file_add_dependency()
2673 SEARCH_FOLLOW_CONFIG_SYMLINKS, changes, n_changes); in unit_file_add_dependency()
2682 UnitFileChange **changes, in do_unit_file_enable() argument
2691 &info, changes, n_changes); in do_unit_file_enable()
2704 SEARCH_LOAD, changes, n_changes); in do_unit_file_enable()
2712 UnitFileChange **changes, in unit_file_enable() argument
2729 return do_unit_file_enable(&lp, scope, flags, config_path, files, changes, n_changes); in unit_file_enable()
2738 UnitFileChange **changes, in do_unit_file_disable() argument
2754 …r = install_context_mark_for_removal(&ctx, lp, &remove_symlinks_to, config_path, changes, n_change… in do_unit_file_disable()
2758 …arked_symlinks(remove_symlinks_to, config_path, lp, flags & UNIT_FILE_DRY_RUN, changes, n_changes); in do_unit_file_disable()
2767 UnitFileChange **changes, in unit_file_disable() argument
2784 return do_unit_file_disable(&lp, scope, flags, config_path, files, changes, n_changes); in unit_file_disable()
2850 UnitFileChange **changes, in unit_file_reenable() argument
2873 r = do_unit_file_disable(&lp, scope, flags, config_path, names, changes, n_changes); in unit_file_reenable()
2878 return do_unit_file_enable(&lp, scope, flags, config_path, files, changes, n_changes); in unit_file_reenable()
2886 UnitFileChange **changes, in unit_file_set_default() argument
2908 r = install_info_discover_and_check(&ctx, &lp, name, 0, &info, changes, n_changes); in unit_file_set_default()
2913 … return create_symlink(&lp, info->path, new_path, flags & UNIT_FILE_FORCE, changes, n_changes); in unit_file_set_default()
3342 UnitFileChange **changes, in execute_preset() argument
3355 … install_context_mark_for_removal(minus, lp, &remove_symlinks_to, config_path, changes, n_changes); in execute_preset()
3359 … r = remove_marked_symlinks(remove_symlinks_to, config_path, lp, false, changes, n_changes); in execute_preset()
3370 SEARCH_LOAD, changes, n_changes); in execute_preset()
3389 UnitFileChange **changes, in preset_prepare_one() argument
3401 &info, changes, n_changes); in preset_prepare_one()
3417 &info, changes, n_changes); in preset_prepare_one()
3423 &info, changes, n_changes); in preset_prepare_one()
3430 &info, changes, n_changes); in preset_prepare_one()
3441 UnitFileChange **changes, in unit_file_preset() argument
3467 r = preset_prepare_one(scope, &plus, &minus, &lp, *i, &presets, changes, n_changes); in unit_file_preset()
3472 …return execute_preset(file_flags, &plus, &minus, &lp, config_path, files, mode, changes, n_changes… in unit_file_preset()
3480 UnitFileChange **changes, in unit_file_preset_all() argument
3524 … r = preset_prepare_one(scope, &plus, &minus, &lp, de->d_name, &presets, changes, n_changes); in unit_file_preset_all()
3533 …return execute_preset(file_flags, &plus, &minus, &lp, config_path, NULL, mode, changes, n_changes); in unit_file_preset_all()