From 66c50cec899fcb25e6a4ea670208defebe8759cd Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Thu, 3 Nov 2011 00:35:19 +0000 Subject: [PATCH] Remove sg-utils test output More bulk cleanup on the path to removing sg-utils dependencies. Trying to make test-sg as simple as possible so I can use it reliably to test on both master and my killsg branch --- src/test_sg.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/test_sg.c b/src/test_sg.c index 34fbe54..a4db8f2 100644 --- a/src/test_sg.c +++ b/src/test_sg.c @@ -14,7 +14,6 @@ int main(int argc, char *argv[]) { // set scpi lib debug level: 0 for no debug info, 10 for lots - const int scsi_verbose = 2; char *dev_name; switch (argc) { @@ -37,14 +36,11 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - fputs("*** stlink access test ***\n", stderr); - fprintf(stderr, "Using sg_lib %s : scsi_pt %s\n", sg_lib_version(), - scsi_pt_version()); - - stlink_t *sl = stlink_quirk_open(dev_name, scsi_verbose); + stlink_t *sl = stlink_quirk_open(dev_name, 10); if (sl == NULL) return EXIT_FAILURE; - + + // we are in mass mode, go to swd stlink_enter_swd_mode(sl); stlink_current_mode(sl); @@ -176,7 +172,7 @@ int main(int argc, char *argv[]) { stlink_force_debug(sl); stlink_status(sl); #endif -#if 1 /* read the system bootloader */ +#if 0 /* read the system bootloader */ fputs("\n++++++++++ reading bootloader ++++++++++++++++\n\n", stderr); stlink_fread(sl, "/tmp/barfoo", sl->sys_base, sl->sys_size); #endif @@ -202,6 +198,7 @@ int main(int argc, char *argv[]) { stlink_run_at(sl, sl->sram_base); #endif +#if 0 stlink_run(sl); stlink_status(sl); //---------------------------------------------------------------------- @@ -209,6 +206,7 @@ int main(int argc, char *argv[]) { stlink_exit_debug_mode(sl); stlink_current_mode(sl); stlink_close(sl); +#endif //fflush(stderr); fflush(stdout); return EXIT_SUCCESS;