# HG changeset patch # User Mychaela Falconia # Date 1615698949 0 # Node ID f6b03af63bf70763cf3b090d2233d8c53adb041e # Parent deeeef558279456744bbede95ab1913d2ad72373 fcsim-calypso-be: add FIONBIO setting to 0 diff -r deeeef558279 -r f6b03af63bf7 calypso/Makefile --- a/calypso/Makefile Sun Mar 14 05:07:34 2021 +0000 +++ b/calypso/Makefile Sun Mar 14 05:15:49 2021 +0000 @@ -6,7 +6,7 @@ INSTBIN=${INSTALL_PREFIX}/bin -MAIN_OBJS= main.o targetfd.o tpinterf.o +MAIN_OBJS= main.o nonblock.o targetfd.o tpinterf.o all: ${PROGS} diff -r deeeef558279 -r f6b03af63bf7 calypso/main.c --- a/calypso/main.c Sun Mar 14 05:07:34 2021 +0000 +++ b/calypso/main.c Sun Mar 14 05:15:49 2021 +0000 @@ -60,6 +60,7 @@ unsigned len; parse_target_fd_opt(argc, argv); + set_serial_nonblock(0); putchar('\n'); while (fgets(inbuf, sizeof inbuf, stdin)) { diff -r deeeef558279 -r f6b03af63bf7 calypso/nonblock.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso/nonblock.c Sun Mar 14 05:15:49 2021 +0000 @@ -0,0 +1,15 @@ +/* + * This module contains the set_serial_nonblock() function. + */ + +#include +#include +#include + +extern int target_fd; + +set_serial_nonblock(state) + int state; +{ + ioctl(target_fd, FIONBIO, &state); +}