- clean up target output strings a bit
- open_file_from_path() now uses logging feature - open_file_from_path() no longer uses paths for anything but "r" mode. Fixes bug waiting to happen. git-svn-id: svn://svn.berlios.de/openocd/trunk@389 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -54,8 +54,14 @@ void add_config_file_name (const char *cfg)
|
||||
config_file_names[num_config_files] = NULL;
|
||||
}
|
||||
|
||||
FILE *open_file_from_path (command_context_t *cmd_ctx, char *file, char *mode)
|
||||
FILE *open_file_from_path (char *file, char *mode)
|
||||
{
|
||||
if (mode[0]!='r')
|
||||
{
|
||||
return fopen(file, mode);
|
||||
} else
|
||||
{
|
||||
|
||||
FILE *fp = NULL;
|
||||
char **search_dirs = script_search_dirs;
|
||||
char *dir;
|
||||
@@ -78,9 +84,10 @@ FILE *open_file_from_path (command_context_t *cmd_ctx, char *file, char *mode)
|
||||
}
|
||||
|
||||
if (fp)
|
||||
command_print(cmd_ctx, "opened %s", full_path);
|
||||
DEBUG("opened %s", full_path);
|
||||
|
||||
return fp;
|
||||
}
|
||||
}
|
||||
|
||||
int parse_config_file(struct command_context_s *cmd_ctx)
|
||||
|
||||
Reference in New Issue
Block a user