changeset 954:21604c3413c1

rvinterf: disallow -Petmoff mode
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 07 Jun 2023 20:15:43 +0000
parents ab54957dbe35
children 803e926e0699
files rvinterf/lowlevel/rvifmain.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvifmain.c	Wed Jun 07 20:06:12 2023 +0000
+++ b/rvinterf/lowlevel/rvifmain.c	Wed Jun 07 20:15:43 2023 +0000
@@ -17,6 +17,7 @@
 
 extern int target_fd, listener;
 extern char *extlcd_program;
+extern int bootctrl_etmoff_mode;
 
 extern u_char rxpkt[];
 extern size_t rxpkt_len;
@@ -108,6 +109,11 @@
 				"usage: %s [options] ttyport\n", argv[0]);
 			exit(1);
 		}
+	if (bootctrl_etmoff_mode) {
+		fprintf(stderr,
+			"error: -Petmoff mode is not valid for rvinterf\n");
+		exit(1);
+	}
 	if (target_fd <= 0) {
 		if (argc - optind != 1)
 			goto usage;