/systemd/src/rfkill/ |
H A D | rfkill.c | 166 char *state_file; local 187 state_file = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, ":", type, NULL); 189 state_file = strjoin("/var/lib/systemd/rfkill/", type, NULL); 191 if (!state_file) 194 *ret = state_file; 204 _cleanup_free_ char *state_file = NULL, *value = NULL; local 220 r = determine_state_file(udev, event, device, &state_file); 224 r = read_one_line_file(state_file, &value); 228 r = write_string_file(state_file, one_zero(event->soft), WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC); 230 return log_error_errno(r, "Failed to write state file %s: %m", state_file); 266 _cleanup_free_ char *state_file = NULL; local [all...] |
/systemd/src/login/ |
H A D | logind-inhibit.c | 47 i->state_file = strappend("/run/systemd/inhibit/", id); 48 if (!i->state_file) { 53 i->id = basename(i->state_file); 56 free(i->state_file); 77 if (i->state_file) { 78 unlink(i->state_file); 79 free(i->state_file); 96 r = fopen_temporary(i->state_file, &f, &temp_path); 144 if (rename(temp_path, i->state_file) < 0) { 152 (void) unlink(i->state_file); [all...] |
H A D | logind-user.c | 74 if (asprintf(&u->state_file, "/run/systemd/users/"UID_FMT, uid) < 0) 129 u->state_file = mfree(u->state_file); 141 assert(u->state_file); 147 r = fopen_temporary(u->state_file, &f, &temp_path); 271 if (rename(temp_path, u->state_file) < 0) { 279 (void) unlink(u->state_file); 284 return log_error_errno(r, "Failed to save user data %s: %m", u->state_file); 303 r = parse_env_file(u->state_file, NEWLINE, 314 log_error_errno(r, "Failed to read %s: %m", u->state_file); [all...] |
H A D | logind-inhibit.h | 52 char *state_file; member in struct:Inhibitor
|
H A D | logind-seat.c | 50 s->state_file = strappend("/run/systemd/seats/", id); 51 if (!s->state_file) { 56 s->id = basename(s->state_file); 60 free(s->state_file); 85 free(s->state_file); 103 r = fopen_temporary(s->state_file, &f, &temp_path); 153 if (rename(temp_path, s->state_file) < 0) { 161 (void) unlink(s->state_file); 166 return log_error_errno(r, "Failed to save seat data %s: %m", s->state_file); 457 unlink(s->state_file); [all...] |
H A D | logind-session.c | 64 s->state_file = strappend("/run/systemd/sessions/", id); 65 if (!s->state_file) { 72 free(s->state_file); 77 s->id = basename(s->state_file); 81 free(s->state_file); 147 free(s->state_file); 176 r = fopen_temporary(s->state_file, &f, &temp_path); 295 if (rename(temp_path, s->state_file) < 0) { 303 (void) unlink(s->state_file); 308 return log_error_errno(r, "Failed to save session data %s: %m", s->state_file); [all...] |
H A D | logind-user.h | 43 char *state_file; member in struct:User
|
H A D | logind-seat.h | 31 char *state_file; member in struct:Seat
|
H A D | logind-session.h | 75 char *state_file; member in struct:Session
|
/systemd/src/journal-remote/ |
H A D | journal-upload.c | 106 if (!u->state_file) 109 r = mkdir_parents(u->state_file, 0755); 112 u->state_file); 114 r = fopen_temporary(u->state_file, &f, &temp_path); 117 u->state_file); 128 if (!u->state_file || !u->last_cursor) 131 r = fopen_temporary(u->state_file, &f, &temp_path); 144 if (rename(temp_path, u->state_file) < 0) { 155 (void) unlink(u->state_file); 157 return log_error_errno(r, "Failed to save state %s: %m", u->state_file); 425 setup_uploader(Uploader *u, const char *url, const char *state_file) argument [all...] |
H A D | journal-upload.h | 47 const char *state_file; member in struct:Uploader
|
/systemd/src/journal/ |
H A D | journald-stream.c | 87 char *state_file; member in struct:StdoutStream 115 free(s->state_file); 126 if (s->state_file) 127 (void) unlink(s->state_file); 142 if (!s->state_file) { 150 if (asprintf(&s->state_file, "/run/systemd/journal/streams/%lu:%lu", (unsigned long) st.st_dev, (unsigned long) st.st_ino) < 0) 156 r = fopen_temporary(s->state_file, &f, &temp_path); 201 if (rename(temp_path, s->state_file) < 0) { 220 (void) unlink(s->state_file); 225 return log_error_errno(r, "Failed to save stream data %s: %m", s->state_file); [all...] |
/systemd/src/machine/ |
H A D | machine.c | 66 m->state_file = strappend("/run/systemd/machines/", m->name); 67 if (!m->state_file) 81 free(m->state_file); 112 free(m->state_file); 126 if (!m->state_file) 136 r = fopen_temporary(m->state_file, &f, &temp_path); 219 if (rename(temp_path, m->state_file) < 0) { 237 (void) unlink(m->state_file); 242 return log_error_errno(r, "Failed to save machine data %s: %m", m->state_file); 256 if (m->state_file) [all...] |
H A D | machine.h | 71 char *state_file; member in struct:Machine
|
/systemd/src/network/ |
H A D | networkd.h | 54 char *state_file; member in struct:Manager
|
H A D | networkd-manager.c | 840 assert(m->state_file); 935 r = fopen_temporary(m->state_file, &f, &temp_path); 954 if (rename(temp_path, m->state_file) < 0) { 971 (void) unlink(m->state_file); 974 return log_error_errno(r, "Failed to save network state to %s: %m", m->state_file); 1005 m->state_file = strdup("/run/systemd/netif/state"); 1006 if (!m->state_file) 1055 free(m->state_file);
|
H A D | networkd-link.c | 341 r = asprintf(&link->state_file, "/run/systemd/netif/links/%d", 417 (void)unlink(link->state_file); 418 free(link->state_file); 1717 (void)unlink(link->state_file); 2252 r = parse_env_file(link->state_file, NEWLINE, 2260 return log_link_error_errno(link, r, "Failed to read %s: %m", link->state_file); 2702 assert(link->state_file); 2707 unlink(link->state_file); 2717 r = fopen_temporary(link->state_file, &f, &temp_path); 2967 if (rename(temp_path, link->state_file) < [all...] |
H A D | networkd-link.h | 68 char *state_file; member in struct:Link
|