From 5161a54e189b59d8115a81b75d930906bb9af882 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:57:01 +0900 Subject: fix RS232 menu - menu did not stored new settings to flash --- device-functions.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'device-functions.c') diff --git a/device-functions.c b/device-functions.c index d1fcb31..27595b4 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4371,7 +4371,7 @@ void Main_update_shift_registers() } -int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash) +int IO_Setup_RS232(int baud, char hardhand) { FILE* configfile = fopen("/tmp/instgettyopts", "w"); if(configfile) { @@ -4384,13 +4384,11 @@ int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash) globals.Flash.baud = baud; globals.Flash.hardhand = hardhand; - if (update_flash) { - int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) + - sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo); + int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) + + sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo); - int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start); - writeUserBlock(&globals.Flash, eprom_loc, size); - } + int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start); + writeUserBlock(&globals.Flash, eprom_loc, size); return OK; } -- cgit