chain position is now required when creating a target

git-svn-id: svn://svn.berlios.de/openocd/trunk@1363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2009-01-28 13:08:06 +00:00
parent 51f8b70904
commit ce1a29725f
3 changed files with 41 additions and 0 deletions

View File

@@ -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 );