[Pdbg] [PATCH 13/18] main: Improve debug output about backends/targets
Amitay Isaacs
amitay at ozlabs.org
Wed May 16 16:17:31 AEST 2018
From: Amitay Isaacs <amitay at gmail.com>
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
---
src/options_arm.c | 20 ++++----------------
src/options_def.c | 4 ++--
src/options_ppc.c | 4 ++--
3 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/src/options_arm.c b/src/options_arm.c
index 1b9032e..2936058 100644
--- a/src/options_arm.c
+++ b/src/options_arm.c
@@ -43,19 +43,7 @@ enum backend default_backend(void)
void print_backends(FILE *stream)
{
- /*
- * "This should never be the default" - Apopple 2017
- */
- fprintf(stream, "I2C KERNEL FSI\n");
-
- if (default_backend() == FAKE) {
- fprintf(stderr, "Couldn't locate a good backend.\n");
- fprintf(stderr, "It is possible that the FSI backend will work.\n");
- fprintf(stderr, "You will need to select this along with the correct\n");
- fprintf(stderr, "target yourself on the commandline\n");
- fprintf(stderr, "`pdbg -b fsi -d [p8 | p9w | p9r | p9z] ...`\n");
- }
-
+ fprintf(stream, "Valid backends: i2c kernel fsi\n");
}
bool backend_is_possible(enum backend backend)
@@ -70,9 +58,9 @@ bool backend_is_possible(enum backend backend)
void print_targets(FILE *stream)
{
- fprintf(stream, "KERNEL: No target is necessary\n");
- fprintf(stream, "I2C: No target is necessary\n");
- fprintf(stream, "FSI: p8 p9w p9r p9z\n");
+ fprintf(stream, "kernel: No target is necessary\n");
+ fprintf(stream, "i2c: No target is necessary\n");
+ fprintf(stream, "fsi: p8 p9w p9r p9z\n");
}
const char *default_target(enum backend backend)
diff --git a/src/options_def.c b/src/options_def.c
index 719fcde..d6b96ce 100644
--- a/src/options_def.c
+++ b/src/options_def.c
@@ -29,7 +29,7 @@ bool backend_is_possible(enum backend backend)
void print_backends(FILE *stream)
{
- fprintf(stream, "FAKE");
+ fprintf(stream, "Valid backends: fake\n");
}
/* Theres no target for FAKE backend */
@@ -40,7 +40,7 @@ const char *default_target(enum backend backend)
void print_targets(FILE *stream)
{
- fprintf(stream, "FAKE: No target is necessary\n");
+ fprintf(stream, "fake: No target is necessary\n");
}
/* Theres no device for FAKE backend */
diff --git a/src/options_ppc.c b/src/options_ppc.c
index 30ed5bb..3478799 100644
--- a/src/options_ppc.c
+++ b/src/options_ppc.c
@@ -34,7 +34,7 @@ bool backend_is_possible(enum backend backend)
void print_backends(FILE *stream)
{
- fprintf(stream, "HOST");
+ fprintf(stream, "Valid backends: host\n");
}
const char *default_target(enum backend backend)
@@ -74,7 +74,7 @@ const char *default_target(enum backend backend)
void print_targets(FILE *stream)
{
- fprintf(stream, "HOST: p8 p9\n");
+ fprintf(stream, "host: p8 p9\n");
}
bool target_is_possible(enum backend backend, const char *target)
--
2.17.0
More information about the Pdbg
mailing list