From fb49700ae1b531c2f6f643307642560b3b01fde5 Mon Sep 17 00:00:00 2001 From: Federico Vaga <federico.vaga@cern.ch> Date: Wed, 14 Dec 2022 11:33:10 +0100 Subject: [PATCH] sw: fix tdc-time output We need to check errno to get the right meaning of an error. Signed-off-by: Federico Vaga <federico.vaga@cern.ch> --- software/tools/fmc-tdc-time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/tools/fmc-tdc-time.c b/software/tools/fmc-tdc-time.c index bbe498f5..5f94b60f 100644 --- a/software/tools/fmc-tdc-time.c +++ b/software/tools/fmc-tdc-time.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) int err = fmctdc_check_wr_mode(brd); printf("WR Status: "); - switch(err) + switch(errno) { case ENODEV: printf("disabled.\n"); break; case ENOLINK: printf("link down.\n"); break; -- GitLab