Lines Matching defs:state_file
166 char *state_file;
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;
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);
232 log_debug("Saved state '%s' to %s.", one_zero(event->soft), state_file);
236 return log_error_errno(r, "Failed to read state file %s: %m", state_file);
240 return log_error_errno(b, "Failed to parse state file %s: %m", state_file);
256 log_debug("Loaded state '%s' from %s.", one_zero(b), state_file);
266 _cleanup_free_ char *state_file = NULL;
277 r = determine_state_file(udev, event, device, &state_file);
281 r = write_string_file(state_file, one_zero(event->soft), WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
283 return log_error_errno(r, "Failed to write state file %s: %m", state_file);
285 log_debug("Saved state '%s' to %s.", one_zero(event->soft), state_file);