From df04302249b8985854c788dd2c62895310805563 Mon Sep 17 00:00:00 2001 From: Simon Dick Date: Thu, 22 Oct 2026 10:14:53 +0100 Subject: [PATCH] SanaConform: fix quirk-stat message for foreign drivers with other special stats PR #41 fixed the RecordCountSupplied==0 case but left the "unexpected" message in place for a foreign driver that returns its own (non-sana2loop) special-stats records without a DMA-hook-offered entry -- a legitimate, expected result for any driver other than loopback.device, not a real anomaly. Branch on DEVICE= to pick the right message. Co-Authored-By: Claude Sonnet 5 --- src/tools/sanaconform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/sanaconform.c b/src/tools/sanaconform.c index 8eb5bc6..6745bff 100644 --- a/src/tools/sanaconform.c +++ b/src/tools/sanaconform.c @@ -498,6 +498,9 @@ int main(int argc, char **argv) } if (!found && stats.hdr.RecordCountSupplied == 0) printf("sana2loop quirk stat: none (expected for drivers other than sana2loop)\n"); + else if (!found && strcmp(device, "loopback.device") != 0) + printf("sana2loop quirk stat: no DMA-hook-offered record (expected -- this " + "driver's own special-stats records are not sana2loop's)\n"); else if (!found) printf("sana2loop quirk stat: no DMA-hook-offered record (unexpected -- this " "probe's own open above should have counted as one)\n");