From 01b69068c91fcc90ed7dc0cdf7e1a7d0cb08af53 Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Thu, 26 Jul 2012 12:46:49 +0200 Subject: [PATCH] irq: Print errors to stderr Trying to (dis)connect an invalid IRQ is an error. Note that the incorrect function name printed in avr_unconnect_irq has been corrected. --- simavr/sim/sim_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simavr/sim/sim_irq.c b/simavr/sim/sim_irq.c index 68d218b..2b346c7 100644 --- a/simavr/sim/sim_irq.c +++ b/simavr/sim/sim_irq.c @@ -217,7 +217,7 @@ avr_connect_irq( avr_irq_t * dst) { if (!src || !dst || src == dst) { - printf("avr_connect_irq invalid irq %p/%p", src, dst); + fprintf(stderr, "error: %s invalid irq %p/%p", __FUNCTION__, src, dst); return; } avr_irq_hook_t *hook = src->hook; @@ -238,7 +238,7 @@ avr_unconnect_irq( avr_irq_hook_t *hook, *prev; if (!src || !dst || src == dst) { - printf("error: avr_connect_irq invalid irq %p/%p", src, dst); fflush(stdout); + fprintf(stderr, "error: %s invalid irq %p/%p", __FUNCTION__, src, dst); return; } hook = src->hook; -- 2.39.5