/* Handles 3-peat */ static ZERO_OR_ERROR FS_write_post_stats(struct one_wire_query *owq) { // Parse the data to be written ZERO_OR_ERROR input_or_error = OWQ_parse_input(owq); Debug_OWQ(owq); if (input_or_error < 0) { LEVEL_DEBUG("Error interpreting input value.") ; return input_or_error ; } return FS_write_post_input( owq ) ; }
static ZERO_OR_ERROR OW_script_read( FILE * script_f, struct one_wire_query * owq ) { size_t fr_return ; memset( OWQ_buffer(owq), 0, OWQ_size(owq) ) ; fr_return = fread( OWQ_buffer(owq), OWQ_size(owq), 1, script_f ) ; if ( fr_return == 0 && ferror(script_f) != 0 ) { LEVEL_DEBUG( "Could not read script data back for %s",PN(owq)->path ) ; return -EIO ; } return OWQ_parse_input( owq ) ; }