/systemd-251/src/rfkill/ |
D | rfkill.c | 102 char *state_file; in determine_state_file() local 125 state_file = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, ":", type); in determine_state_file() 127 state_file = strjoin("/var/lib/systemd/rfkill/", type); in determine_state_file() 129 if (!state_file) in determine_state_file() 132 *ret = state_file; in determine_state_file() 137 _cleanup_free_ char *state_file = NULL, *value = NULL; in load_state() local 147 r = determine_state_file(event, &state_file); in load_state() 151 r = read_one_line_file(state_file, &value); in load_state() 155 …r = write_string_file(state_file, one_zero(event->soft), WRITE_STRING_FILE_CREATE|WRITE_STRING_FIL… in load_state() 157 return log_error_errno(r, "Failed to write state file %s: %m", state_file); in load_state() [all …]
|
/systemd-251/src/journal-remote/ |
D | journal-upload.c | 103 if (!u->state_file) in check_cursor_updating() 106 r = mkdir_parents(u->state_file, 0755); in check_cursor_updating() 109 u->state_file); in check_cursor_updating() 111 r = fopen_temporary(u->state_file, &f, &temp_path); in check_cursor_updating() 114 u->state_file); in check_cursor_updating() 125 if (!u->state_file || !u->last_cursor) in update_cursor_state() 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() 152 (void) unlink(u->state_file); in update_cursor_state() 154 return log_error_errno(r, "Failed to save state %s: %m", u->state_file); in update_cursor_state() [all …]
|
D | journal-upload.h | 51 const char *state_file; member
|
/systemd-251/src/login/ |
D | logind-inhibit.c | 51 i->state_file = path_join("/run/systemd/inhibit", id); in inhibitor_new() 52 if (!i->state_file) in inhibitor_new() 55 i->id = basename(i->state_file); in inhibitor_new() 80 free(i->state_file); in inhibitor_free() 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() 153 (void) unlink(i->state_file); in inhibitor_save() 158 return log_error_errno(r, "Failed to save inhibit data %s: %m", i->state_file); in inhibitor_save() 204 if (i->state_file) in inhibitor_stop() 205 (void) unlink(i->state_file); in inhibitor_stop() [all …]
|
D | logind-seat.c | 47 s->state_file = path_join("/run/systemd/seats", id); in seat_new() 48 if (!s->state_file) in seat_new() 51 s->id = basename(s->state_file); in seat_new() 79 free(s->state_file); in seat_free() 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() 153 (void) unlink(s->state_file); in seat_save() 158 return log_error_errno(r, "Failed to save seat data %s: %m", s->state_file); in seat_save() 450 (void) unlink(s->state_file); in seat_stop()
|
D | logind-user.c | 68 if (asprintf(&u->state_file, "/run/systemd/users/" UID_FMT, ur->uid) < 0) in user_new() 136 u->state_file = mfree(u->state_file); in user_free() 149 assert(u->state_file); in user_save_internal() 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() 289 (void) unlink(u->state_file); in user_save_internal() 294 return log_error_errno(r, "Failed to save user data %s: %m", u->state_file); in user_save_internal() 312 r = parse_env_file(NULL, u->state_file, in user_load() 321 return log_error_errno(r, "Failed to read %s: %m", u->state_file); in user_load() 564 (void) unlink(u->state_file); in user_finalize()
|
D | logind-session.c | 70 s->state_file = path_join("/run/systemd/sessions", id); in session_new() 71 if (!s->state_file) in session_new() 74 s->id = basename(s->state_file); in session_new() 151 free(s->state_file); in session_free() 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() 353 (void) unlink(s->state_file); in session_save() 358 return log_error_errno(r, "Failed to save session data %s: %m", s->state_file); in session_save() 422 r = parse_env_file(NULL, s->state_file, in session_load() 450 return log_error_errno(r, "Failed to read %s: %m", s->state_file); in session_load() [all …]
|
D | logind-inhibit.h | 34 char *state_file; member
|
D | logind-user.h | 27 char *state_file; member
|
D | logind-seat.h | 13 char *state_file; member
|
D | logind-session.h | 67 char *state_file; member
|
/systemd-251/src/machine/ |
D | machine.c | 56 m->state_file = path_join("/run/systemd/machines", m->name); in machine_new() 57 if (!m->state_file) in machine_new() 71 free(m->state_file); in machine_new() 101 free(m->state_file); in machine_free() 115 if (!m->state_file) in machine_save() 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() 226 (void) unlink(m->state_file); in machine_save() 231 return log_error_errno(r, "Failed to save machine data %s: %m", m->state_file); in machine_save() 244 if (m->state_file) in machine_unlink() [all …]
|
D | machine.h | 43 char *state_file; member
|
/systemd-251/src/journal/ |
D | journald-stream.c | 97 char *state_file; member 130 free(s->state_file); in stdout_stream_free() 142 if (s->state_file) in stdout_stream_destroy() 143 (void) unlink(s->state_file); in stdout_stream_destroy() 158 if (!s->state_file) { in stdout_stream_save() 166 …r = asprintf(&s->state_file, "%s/streams/%lu:%lu", s->server->runtime_directory, (unsigned long) s… in stdout_stream_save() 171 (void) mkdir_parents(s->state_file, 0755); 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() 241 (void) unlink(s->state_file); in stdout_stream_save() [all …]
|
/systemd-251/src/resolve/ |
D | resolved-link.c | 46 if (asprintf(&l->state_file, "/run/systemd/resolve/netif/%i", ifindex) < 0) in link_new() 99 free(l->state_file); in link_free() 1176 assert(l->state_file); in link_save_user() 1179 (void) unlink(l->state_file); in link_save_user() 1183 r = mkdir_parents(l->state_file, 0700); in link_save_user() 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() 1271 (void) unlink(l->state_file); in link_save_user() 1276 return log_link_error_errno(l, r, "Failed to save link data %s: %m", l->state_file); in link_save_user() 1294 assert(l->state_file); in link_load_user() [all …]
|
D | resolved-link.h | 80 char *state_file; member
|
/systemd-251/src/network/ |
D | networkd-state-file.c | 123 if (isempty(m->state_file)) 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() 474 if (isempty(link->state_file)) 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()
|
D | networkd-manager.c | 387 … log_warning_errno(r, "Failed to update state file %s, ignoring: %m", m->state_file); in manager_dirty_handler() 393 …link_warning_errno(link, r, "Failed to update link state file %s, ignoring: %m", link->state_file); in manager_dirty_handler() 504 m->state_file = strdup("/run/systemd/netif/state"); in manager_setup() 505 if (!m->state_file) in manager_setup() 541 free(m->state_file); in manager_free() 616 log_warning_errno(r, "Failed to update state file %s, ignoring: %m", m->state_file); in manager_start() 621 …link_warning_errno(link, r, "Failed to update link state file %s, ignoring: %m", link->state_file); in manager_start()
|
D | networkd-manager.h | 42 char *state_file; member
|
D | networkd-link.c | 229 unlink_and_free(link->state_file); in link_free() 930 if (link->state_file) in link_drop() 931 (void) unlink(link->state_file); in link_drop() 2454 …_cleanup_free_ char *ifname = NULL, *kind = NULL, *state_file = NULL, *lease_file = NULL, *lldp_fi… in link_new() local 2490 if (asprintf(&state_file, "/run/systemd/netif/links/%d", ifindex) < 0) in link_new() 2515 .state_file = TAKE_PTR(state_file), in link_new()
|
D | networkd-link.h | 59 char *state_file; member
|