Add target_examine_one wrapper:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 11:32:10 +0000 (11:32 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 11:32:10 +0000 (11:32 +0000)
- replaces all calls to target->type->examine.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1968 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/arm7_9_common.c
src/target/target.c
src/target/target.h

index f6f277102fb63d0e8fc139a38940c10fd506563c..9751c213107cbf79ea52bff73b517cacc2d3865c 100644 (file)
@@ -1051,7 +1051,7 @@ int arm7_9_deassert_reset(target_t *target)
        {
                LOG_WARNING("srst pulls trst - can not reset into halted mode. Issuing halt after reset.");
                /* set up embedded ice registers again */
-               if ((retval=target->type->examine(target))!=ERROR_OK)
+               if ((retval = target_examine_one(target)) != ERROR_OK)
                        return retval;
 
                if ((retval=target_poll(target))!=ERROR_OK)
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;
        }
index 6e282d9ee02fa804d323168e95b311c1835b4661..1eb1ba1b9ac11f5deabaf54b7811c3665a7de596 100644 (file)
@@ -406,6 +406,12 @@ extern target_t *get_target(const char *id);
  */
 extern const char *target_get_name(struct target_s *target);
 
+/**
+ * Examine the specified @a target.
+ *
+ * This routine is a wrapper for target->type->examine.
+ */
+extern int target_examine_one(struct target_s *target);
 /// @returns @c true if the target has been examined.
 extern bool target_was_examined(struct target_s *target);
 /// Sets the @c examined flag for the given target.

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)