From a359fded6d84d2024652a38fd193e11bc8dab89e Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Wed, 28 Aug 2002 09:25:04 +0000 Subject: [PATCH] tap_init(): Added test for return value of the ioperm() call. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@129 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/src/tap/ctrl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jtag/src/tap/ctrl.c b/jtag/src/tap/ctrl.c index 0210085c..8fca7e2a 100644 --- a/jtag/src/tap/ctrl.c +++ b/jtag/src/tap/ctrl.c @@ -40,7 +40,11 @@ void tap_init( void ) { tap_state_init(); - ioperm( port, 2, 1 ); + printf( "Initilizing parallel TAP on port 0x%x\n", port ); + if (ioperm( port, 2, 1 )) { + printf( "Error: Initialization failed!\n" ); + return; + } tap_state_set_trst( (inb( port ) >> TRST) & 1 ); }