Home
last modified time | relevance | path

Searched refs:temp_path (Results 1 – 22 of 22) sorted by relevance

/systemd-251/src/import/
Dexport-tar.c25 char *temp_path; member
62 if (e->temp_path) { in tar_export_unref()
63 (void) btrfs_subvol_remove(e->temp_path, BTRFS_REMOVE_QUOTA); in tar_export_unref()
64 free(e->temp_path); in tar_export_unref()
290 e->temp_path = mfree(e->temp_path); in tar_export_start()
292 r = tempfn_random(path, NULL, &e->temp_path); in tar_export_start()
297 …r = btrfs_subvol_snapshot_fd(sfd, e->temp_path, BTRFS_SNAPSHOT_READ_ONLY|BTRFS_SNAPSHOT_RECURSIVE); in tar_export_start()
299 …ug_errno(r, "Couldn't create snapshot %s of %s, not exporting atomically: %m", e->temp_path, path); in tar_export_start()
300 e->temp_path = mfree(e->temp_path); in tar_export_start()
319 e->tar_fd = import_fork_tar_c(e->temp_path ?: e->path, &e->tar_pid); in tar_export_start()
Dpull-raw.c67 char *temp_path; member
99 unlink_and_free(i->temp_path); in raw_pull_unref()
281 unlink_and_free(i->temp_path); in raw_pull_maybe_convert_qcow2()
282 i->temp_path = TAKE_PTR(t); in raw_pull_maybe_convert_qcow2()
468 char **temp_path, in raw_pull_rename_auxiliary_file() argument
475 assert(temp_path); in raw_pull_rename_auxiliary_file()
476 assert(*temp_path); in raw_pull_rename_auxiliary_file()
487 AT_FDCWD, *temp_path, in raw_pull_rename_auxiliary_file()
494 *temp_path = mfree(*temp_path); in raw_pull_rename_auxiliary_file()
619 assert(i->temp_path); in raw_pull_job_on_finished()
[all …]
Dimport-raw.c41 char *temp_path; member
73 unlink_and_free(i->temp_path); in raw_import_unref()
196 unlink_and_free(i->temp_path); in raw_import_maybe_convert_qcow2()
197 i->temp_path = TAKE_PTR(t); in raw_import_maybe_convert_qcow2()
242 r = install_file(AT_FDCWD, i->temp_path ?: i->local, in raw_import_finish()
250 i->temp_path = mfree(i->temp_path); in raw_import_finish()
263 assert(!i->temp_path); in raw_import_open_disk()
286 r = tempfn_random(i->final_path, NULL, &i->temp_path); in raw_import_open_disk()
290 (void) mkdir_parents_label(i->temp_path, 0700); in raw_import_open_disk()
292 i->output_fd = open(i->temp_path, O_RDWR|O_CREAT|O_EXCL|O_NOCTTY|O_CLOEXEC, 0664); in raw_import_open_disk()
[all …]
Dimport-tar.c42 char *temp_path; member
75 rm_rf_subvolume_and_free(i->temp_path); in tar_import_unref()
175 assert_se(d = i->temp_path ?: i->local); in tar_import_finish()
190 i->temp_path = mfree(i->temp_path); in tar_import_finish()
202 assert(!i->temp_path); in tar_import_fork_tar()
213 r = tempfn_random(i->final_path, NULL, &i->temp_path); in tar_import_fork_tar()
217 d = i->temp_path; in tar_import_fork_tar()
Dpull-tar.c62 char *temp_path; member
85 rm_rf_subvolume_and_free(i->temp_path); in tar_pull_unref()
400 assert(!i->temp_path); in tar_pull_job_on_finished()
425 assert(i->temp_path); in tar_pull_job_on_finished()
430 r = import_mangle_os_tree(i->temp_path); in tar_pull_job_on_finished()
435 AT_FDCWD, i->temp_path, in tar_pull_job_on_finished()
444 i->temp_path = mfree(i->temp_path); in tar_pull_job_on_finished()
506 if (!i->temp_path) { in tar_pull_job_on_open_disk_tar()
507 r = tempfn_random_child(i->image_root, "tar", &i->temp_path); in tar_pull_job_on_open_disk_tar()
512 where = i->temp_path; in tar_pull_job_on_open_disk_tar()
Dimport-fs.c101 _cleanup_(rm_rf_subvolume_and_freep) char *temp_path = NULL; in import_fs()
184 r = tempfn_random(final_path, NULL, &temp_path); in import_fs()
188 dest = temp_path; in import_fs()
248 temp_path = mfree(temp_path); in import_fs()
/systemd-251/src/network/
Dnetworkd-state-file.c115 _cleanup_(unlink_and_freep) char *temp_path = NULL; in manager_save()
248 r = fopen_temporary(m->state_file, &f, &temp_path); in manager_save()
277 r = conservative_rename(temp_path, m->state_file); in manager_save()
281 temp_path = mfree(temp_path); in manager_save()
467 _cleanup_(unlink_and_freep) char *temp_path = NULL; in link_save()
500 r = fopen_temporary(link->state_file, &f, &temp_path); in link_save()
688 r = conservative_rename(temp_path, link->state_file); in link_save()
692 temp_path = mfree(temp_path); in link_save()
Dnetworkd-lldp-rx.c111 _cleanup_(unlink_and_freep) char *temp_path = NULL; in link_lldp_save()
136 r = fopen_temporary(link->lldp_file, &f, &temp_path); in link_lldp_save()
160 r = conservative_rename(temp_path, link->lldp_file); in link_lldp_save()
/systemd-251/src/locale/
Dkeymap-util.c354 _cleanup_free_ char *temp_path = NULL; in x11_write_data() local
371 r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path); in x11_write_data()
402 if (rename(temp_path, "/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) { in x11_write_data()
413 if (temp_path) in x11_write_data()
414 (void) unlink(temp_path); in x11_write_data()
804 _cleanup_(unlink_and_freep) char *temp_path = NULL; in locale_gen_enable_locale()
833 r = fopen_temporary("/etc/locale.gen", &fw, &temp_path); in locale_gen_enable_locale()
916 if (rename(temp_path, "/etc/locale.gen") < 0) in locale_gen_enable_locale()
918 temp_path = mfree(temp_path); in locale_gen_enable_locale()
/systemd-251/src/journal-remote/
Djournal-upload.c99 _cleanup_free_ char *temp_path = NULL; in check_cursor_updating() local
111 r = fopen_temporary(u->state_file, &f, &temp_path); in check_cursor_updating()
115 (void) unlink(temp_path); in check_cursor_updating()
121 _cleanup_free_ char *temp_path = NULL; in update_cursor_state() local
128 r = fopen_temporary(u->state_file, &f, &temp_path); in update_cursor_state()
141 if (rename(temp_path, u->state_file) < 0) { in update_cursor_state()
149 if (temp_path) in update_cursor_state()
150 (void) unlink(temp_path); in update_cursor_state()
/systemd-251/src/shared/
Dtmpfile-util-label.c13 char **temp_path) { in fopen_temporary_label() argument
21 r = fopen_temporary(path, f, temp_path); in fopen_temporary_label()
Dtmpfile-util-label.h10 int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path);
Dsmack-util.h48 int rename_and_apply_smack_floor_label(const char *temp_path, const char *dest_path);
/systemd-251/src/login/
Dlogind-inhibit.c87 _cleanup_free_ char *temp_path = NULL; in inhibitor_save() local
97 r = fopen_temporary(i->state_file, &f, &temp_path); in inhibitor_save()
145 if (rename(temp_path, i->state_file) < 0) { in inhibitor_save()
155 if (temp_path) in inhibitor_save()
156 (void) unlink(temp_path); in inhibitor_save()
Dlogind-seat.c85 _cleanup_free_ char *temp_path = NULL; in seat_save() local
98 r = fopen_temporary(s->state_file, &f, &temp_path); in seat_save()
145 if (rename(temp_path, s->state_file) < 0) { in seat_save()
155 if (temp_path) in seat_save()
156 (void) unlink(temp_path); in seat_save()
Dlogind-user.c144 _cleanup_free_ char *temp_path = NULL; in user_save_internal() local
155 r = fopen_temporary(u->state_file, &f, &temp_path); in user_save_internal()
281 if (rename(temp_path, u->state_file) < 0) { in user_save_internal()
291 if (temp_path) in user_save_internal()
292 (void) unlink(temp_path); in user_save_internal()
Dlogind-session.c203 _cleanup_free_ char *temp_path = NULL; in session_save() local
219 r = fopen_temporary(s->state_file, &f, &temp_path); in session_save()
345 if (rename(temp_path, s->state_file) < 0) { in session_save()
355 if (temp_path) in session_save()
356 (void) unlink(temp_path); in session_save()
Dlogind-dbus.c2113 _cleanup_free_ char *temp_path = NULL; in update_schedule_file() local
2124 r = fopen_temporary(SHUTDOWN_SCHEDULE_FILE, &f, &temp_path); in update_schedule_file()
2148 if (rename(temp_path, SHUTDOWN_SCHEDULE_FILE) < 0) { in update_schedule_file()
2156 (void) unlink(temp_path); in update_schedule_file()
/systemd-251/src/machine/
Dmachine.c109 _cleanup_free_ char *temp_path = NULL; in machine_save() local
125 r = fopen_temporary(m->state_file, &f, &temp_path); in machine_save()
208 if (rename(temp_path, m->state_file) < 0) { in machine_save()
228 if (temp_path) in machine_save()
229 (void) unlink(temp_path); in machine_save()
/systemd-251/src/journal/
Djournald-stream.c149 _cleanup_(unlink_and_freep) char *temp_path = NULL; in stdout_stream_save()
173 r = fopen_temporary(s->state_file, &f, &temp_path); in stdout_stream_save()
220 if (rename(temp_path, s->state_file) < 0) { in stdout_stream_save()
225 temp_path = mfree(temp_path); in stdout_stream_save()
/systemd-251/src/libsystemd-network/
Dsd-dhcp-lease.c964 _cleanup_(unlink_and_freep) char *temp_path = NULL; in dhcp_lease_save()
981 r = fopen_temporary(lease_file, &f, &temp_path); in dhcp_lease_save()
1119 r = conservative_rename(temp_path, lease_file); in dhcp_lease_save()
1123 temp_path = mfree(temp_path); in dhcp_lease_save()
/systemd-251/src/resolve/
Dresolved-link.c1170 _cleanup_free_ char *temp_path = NULL; in link_save_user() local
1187 r = fopen_temporary(l->state_file, &f, &temp_path); in link_save_user()
1263 if (rename(temp_path, l->state_file) < 0) { in link_save_user()
1273 if (temp_path) in link_save_user()
1274 (void) unlink(temp_path); in link_save_user()