diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-28 13:08:06 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-28 13:08:06 +0000 |
commit | ce1a29725f8394f008812c3b3a8c60f03aaa08d1 (patch) | |
tree | 1f27fc2f9be7962e79edaa68834b8bba06055271 /src/target/target.c | |
parent | 51f8b7090435191bb6aaa69d3d4c341f76c72ea1 (diff) |
chain position is now required when creating a target
git-svn-id: svn://svn.berlios.de/openocd/trunk@1363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.c')
-rw-r--r-- | src/target/target.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/target/target.c b/src/target/target.c index bafd98e9..cc1d48a8 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3341,6 +3341,8 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target ) break; } } /* while( goi->argc ) */ + + /* done - we return */ return JIM_OK; } @@ -3839,6 +3841,13 @@ static int target_create( Jim_GetOptInfo *goi ) /* Do the rest as "configure" options */ goi->isconfigure = 1; e = target_configure( goi, target); + + if (target->tap == NULL) + { + Jim_SetResultString( interp, "-chain-position required when creating target", -1); + e=JIM_ERR; + } + if( e != JIM_OK ){ free( target->type ); free( target ); |