Message ID | 20181109071011.253734-7-amitay@ozlabs.org |
---|---|
State | Superseded |
Headers | show |
Series | Device tree path based targeting | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
snowpatch_ozlabs/snowpatch_job_snowpatch-pdbg | success | Test snowpatch/job/snowpatch-pdbg on branch master |
I like it. More straight forward and less error prone than relying on each command to explicitly probe targets. Reviewed-by: Alistair Popple <alistair@popple.id.au> On Friday, 9 November 2018 6:10:02 PM AEDT Amitay Isaacs wrote: > Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> > --- > src/main.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/main.c b/src/main.c > index 9252eb3..3e3835c 100644 > --- a/src/main.c > +++ b/src/main.c > @@ -775,6 +775,7 @@ int main(int argc, char *argv[]) > int i, rc = 0; > void **args, **flags; > optcmd_cmd_t *cmd; > + struct pdbg_target *target; > > backend = default_backend(); > > @@ -793,6 +794,11 @@ int main(int argc, char *argv[]) > if (!target_selection()) > return 1; > > + /* Probe all selected targets */ > + for_each_path_target(target) { > + pdbg_target_probe(target); > + } > + > atexit(atexit_release); > > for (i = 0; i < ARRAY_SIZE(cmds); i++) {
diff --git a/src/main.c b/src/main.c index 9252eb3..3e3835c 100644 --- a/src/main.c +++ b/src/main.c @@ -775,6 +775,7 @@ int main(int argc, char *argv[]) int i, rc = 0; void **args, **flags; optcmd_cmd_t *cmd; + struct pdbg_target *target; backend = default_backend(); @@ -793,6 +794,11 @@ int main(int argc, char *argv[]) if (!target_selection()) return 1; + /* Probe all selected targets */ + for_each_path_target(target) { + pdbg_target_probe(target); + } + atexit(atexit_release); for (i = 0; i < ARRAY_SIZE(cmds); i++) {
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+)