Commit 8e28ad7c authored by Federico Vaga's avatar Federico Vaga

sw:drv: copy timetag on error for error reporting

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 2a83d638
......@@ -684,10 +684,9 @@ static int zfad_block_timetag_extract(struct zio_block *block,
tg = block->data + block->datalen - FA_TRIG_TIMETAG_BYTES;
/* resize the datalen, by removing the trigger tstamp */
block->datalen = block->datalen - FA_TRIG_TIMETAG_BYTES;
memcpy(timetag, tg, sizeof(*timetag));
if (unlikely((tg->sec_high >> 8) != 0xACCE55))
return -EINVAL;
memcpy(timetag, tg, sizeof(*timetag));
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment