From: Jakob Gruber Date: Thu, 26 Jul 2012 10:46:49 +0000 (+0200) Subject: irq: Print errors to stderr X-Git-Tag: v1.0~46 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=01b69068c91fcc90ed7dc0cdf7e1a7d0cb08af53;p=sx%2Fsimavr.git 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. --- 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;