summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2018-02-14 15:27:43 +1100
committerAlistair Popple <alistair@popple.id.au>2018-02-16 16:22:23 +1100
commit8fb428320252d606658bbd25acfb1eadc516bdd2 (patch)
treea32a24a876eaeb75c5f32e88694318418e5ac5c0
parent2f0db42bf79bb0e91cc424dcb71ba78ff4766526 (diff)
downloadpdbg-8fb428320252d606658bbd25acfb1eadc516bdd2.tar.gz
pdbg-8fb428320252d606658bbd25acfb1eadc516bdd2.zip
pdbg/htm: Force the user to learn the new HTM commands
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
-rw-r--r--src/htm.c75
1 files changed, 65 insertions, 10 deletions
diff --git a/src/htm.c b/src/htm.c
index 56fcf26..fee745d 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -304,41 +304,96 @@ int run_htm(int optind, int argc, char *argv[])
}
/*
- * These are all the old handlers that only worked with nest HTM.
- * I don't want to break the commands but we've gone with a more
- * flexible HTM command structure to better incorporate core HTM.
+ * Handle the deprecated commands by telling the user what the new
+ * command is.
*/
int run_htm_start(int optind, int argc, char *argv[])
{
- return run_start(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest start\n");
+
+ return 0;
}
int run_htm_stop(int optind, int argc, char *argv[])
{
- return run_stop(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest stop\n");
+
+ return 0;
}
int run_htm_status(int optind, int argc, char *argv[])
{
- return run_status(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest status\n");
+
+ return 0;
}
int run_htm_reset(int optind, int argc, char *argv[])
{
- return run_reset(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest reset\n");
+
+ return 0;
}
int run_htm_dump(int optind, int argc, char *argv[])
{
- return run_dump(HTM_NEST, optind, argc, argv);;
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest dump\n");
+
+ return 0;
}
int run_htm_trace(int optind, int argc, char *argv[])
{
- return run_trace(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest trace\n");
+
+ return 0;
}
int run_htm_analyse(int optind, int argc, char *argv[])
{
- return run_analyse(HTM_NEST, optind, argc, argv);
+ int i;
+
+ fprintf(stderr, "You're running a deprecated command!\n");
+ fprintf(stderr, "Please use:\n");
+ for (i = 0; i < optind; i++)
+ fprintf(stderr, "%s ", argv[i]);
+ fprintf(stderr, "htm nest analyse\n");
+
+ return 0;
}
OpenPOWER on IntegriCloud