Lines Matching refs:n_changes
264 size_t *n_changes, in unit_file_changes_add() argument
272 assert(!changes == !n_changes); in unit_file_changes_add()
282 c = reallocarray(*changes, *n_changes + 1, sizeof(UnitFileChange)); in unit_file_changes_add()
303 c[(*n_changes)++] = (UnitFileChange) { 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()
315 for (size_t i = 0; i < n_changes; i++) { in unit_file_changes_free()
323 …ump_changes(int r, const char *verb, const UnitFileChange *changes, size_t n_changes, bool quiet) { in unit_file_dump_changes() argument
326 assert(changes || n_changes == 0); in unit_file_dump_changes()
330 for (size_t i = 0; i < n_changes; i++) { in unit_file_dump_changes()
482 size_t *n_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()
583 size_t *n_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()
716 size_t *n_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()
1073 size_t *n_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()
1728 size_t *n_changes) { in install_info_discover() argument
1742 unit_file_changes_add(changes, n_changes, r, name, NULL); in install_info_discover()
1753 size_t *n_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()
1769 size_t *n_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()
1872 size_t *n_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()
1918 size_t *n_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()
2022 size_t *n_changes) { in install_info_symlink_link() argument
2042 return create_symlink(lp, info->path, path, force, changes, n_changes); in install_info_symlink_link()
2052 size_t *n_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()
2092 size_t *n_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()
2161 size_t *n_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()
2224 size_t *n_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()
2269 size_t *n_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()
2361 size_t *n_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()
2460 size_t *n_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 …= remove_marked_symlinks(remove_symlinks_to, lp.persistent_config, &lp, false, changes, n_changes); in unit_file_revert()
2614 size_t *n_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()
2683 size_t *n_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()
2713 size_t *n_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()
2739 size_t *n_changes) { in do_unit_file_disable() argument
2754 …= install_context_mark_for_removal(&ctx, lp, &remove_symlinks_to, config_path, changes, n_changes); 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()
2768 size_t *n_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()
2851 size_t *n_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()
2887 size_t *n_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()
3343 size_t *n_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()
3390 size_t *n_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()
3442 size_t *n_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 …eturn execute_preset(file_flags, &plus, &minus, &lp, config_path, files, mode, changes, n_changes); in unit_file_preset()
3481 size_t *n_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()