- merged XScale branch back into trunk
- fixed some compiler warnigns in amt_jtagaccel.c, bitbang.c, parport.c - free working area and register stuff if str7x block write algorithm failed - check PC after exiting a target algorithm in armv4_5.c git-svn-id: svn://svn.berlios.de/openocd/trunk@135 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -242,22 +242,23 @@ int fileio_open(fileio_t *fileio, char *url, enum fileio_access access,
|
||||
enum fileio_pri_type pri_type, void *pri_info, enum fileio_sec_type sec_type)
|
||||
{
|
||||
int retval = ERROR_OK;
|
||||
|
||||
if ((!url) || (strlen(url) < 3))
|
||||
char *resource_identifier = NULL;
|
||||
|
||||
/* try to identify file location */
|
||||
if ((resource_identifier = strstr(url, "bootp://")) && (resource_identifier == url))
|
||||
{
|
||||
snprintf(fileio->error_str, FILEIO_MAX_ERROR_STRING, "invalid file url");
|
||||
return ERROR_INVALID_ARGUMENTS;
|
||||
ERROR("bootp resource location isn't supported yet");
|
||||
return ERROR_FILEIO_RESOURCE_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
if ((url[0] == '/') || (isalpha(url[0])) || ((url[1] == ':') && (url[2] == '\\')))
|
||||
else if ((resource_identifier = strstr(url, "tftp://")) && (resource_identifier == url))
|
||||
{
|
||||
fileio->location = FILEIO_LOCAL;
|
||||
ERROR("tftp resource location isn't supported yet");
|
||||
return ERROR_FILEIO_RESOURCE_TYPE_UNKNOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR("couldn't identify resource location from URL '%s'", url);
|
||||
snprintf(fileio->error_str, FILEIO_MAX_ERROR_STRING, "couldn't identify resource location from URL '%s'", url);
|
||||
return ERROR_FILEIO_LOCATION_UNKNOWN;
|
||||
/* default to local files */
|
||||
fileio->location = FILEIO_LOCAL;
|
||||
}
|
||||
|
||||
fileio->access = access;
|
||||
|
||||
Reference in New Issue
Block a user