comparison rvinterf/lowlevel/rvifmain.c @ 954:21604c3413c1

rvinterf: disallow -Petmoff mode
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 07 Jun 2023 20:15:43 +0000
parents 80feb10f8ef8
children
comparison
equal deleted inserted replaced
953:ab54957dbe35 954:21604c3413c1
15 #include "../include/localsock.h" 15 #include "../include/localsock.h"
16 #include "client.h" 16 #include "client.h"
17 17
18 extern int target_fd, listener; 18 extern int target_fd, listener;
19 extern char *extlcd_program; 19 extern char *extlcd_program;
20 extern int bootctrl_etmoff_mode;
20 21
21 extern u_char rxpkt[]; 22 extern u_char rxpkt[];
22 extern size_t rxpkt_len; 23 extern size_t rxpkt_len;
23 24
24 extern void output_cont_logpref(); 25 extern void output_cont_logpref();
106 default: 107 default:
107 usage: fprintf(stderr, 108 usage: fprintf(stderr,
108 "usage: %s [options] ttyport\n", argv[0]); 109 "usage: %s [options] ttyport\n", argv[0]);
109 exit(1); 110 exit(1);
110 } 111 }
112 if (bootctrl_etmoff_mode) {
113 fprintf(stderr,
114 "error: -Petmoff mode is not valid for rvinterf\n");
115 exit(1);
116 }
111 if (target_fd <= 0) { 117 if (target_fd <= 0) {
112 if (argc - optind != 1) 118 if (argc - optind != 1)
113 goto usage; 119 goto usage;
114 open_serial_port(argv[optind]); 120 open_serial_port(argv[optind]);
115 set_fixed_baudrate(baudrate); 121 set_fixed_baudrate(baudrate);