From 3a0b0510333c63fc97716529ab519b2fb9450ae2 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Wed, 6 Jul 2011 14:45:45 +0000 Subject: [PATCH] Correct checking of the parameter number of parallel cable * src/tap/chain.c (urj_tap_chain_connect): Correct checking of the parameter number of parallel cable. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1957 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 5 +++++ urjtag/src/tap/chain.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 40e34d0a..97a5aea4 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2011-07-06 Jie Zhang + + * src/tap/chain.c (urj_tap_chain_connect): Correct checking of the + parameter number of parallel cable. + 2011-07-04 Mike Frysinger * src/bus/arm9tdmi.c, src/bus/ejtag_dma.c, src/bus/ixp435.c, diff --git a/urjtag/src/tap/chain.c b/urjtag/src/tap/chain.c index 57bc327b..c6070ac4 100644 --- a/urjtag/src/tap/chain.c +++ b/urjtag/src/tap/chain.c @@ -96,10 +96,10 @@ urj_tap_chain_connect (urj_chain_t *chain, const char *drivername, char *params[ if (driver->device_type == URJ_CABLE_DEVICE_PARPORT) { - if (paramc < 1) + if (paramc < 2) { urj_error_set (URJ_ERROR_SYNTAX, - "parallel cable requires >= 2 parameters, got %d", paramc); + "parallel cable requires >= 4 parameters, got %d", paramc); return URJ_STATUS_FAIL; } for (j = 0; j < URJ_CABLE_PARPORT_N_DEVS; j++)