Add target_examine_one wrapper:
[fw/openocd] / src / target / target.c
index 16d28727bc9c4c4d7e956f6524e8ec5ed0d55e77..04d162b5c7fe23250d05a9da2ce94daa559f005d 100644 (file)
@@ -467,6 +467,11 @@ static int default_examine(struct target_s *target)
        return ERROR_OK;
 }
 
+int target_examine_one(struct target_s *target)
+{
+       return target->type->examine(target);
+}
+
 /* Targets that correctly implement init+examine, i.e.
  * no communication with target during init:
  *
@@ -478,7 +483,7 @@ int target_examine(void)
        target_t *target = all_targets;
        while (target)
        {
-               if ((retval = target->type->examine(target))!=ERROR_OK)
+               if ((retval = target_examine_one(target)) != ERROR_OK)
                        return retval;
                target = target->next;
        }