mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Disable custom baudrate support at runtime (Linux)
If picocom is compiled *with* custom-baudrate support (USE_CUSTOM_BAUD) for Linux, then it uses a new set of ioctl's (TCGETS2 vs TCGETS, etc) to access the serial ports. This patch allows the custom baudrate support to be disabled at runtime (without recompiling), and picocom to switch to using the old ioctl's. To disable custom baudrate support (and switch back to the "old" ioctls) simply define the environment variable NO_CUSTOM_BAUD, before starting picocom. This applies only to Linux and, obviously, only when picocom has been compiled with custom baudrate support (USE_CUSTOM_BAUD).
This commit is contained in:
5
Makefile
5
Makefile
@ -49,7 +49,7 @@ linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
|
||||
#CPPFLAGS += -DNO_HELP
|
||||
|
||||
|
||||
OBJS += picocom.o term.o fdio.o split.o termios2.o custbaud_bsd.o
|
||||
OBJS += picocom.o term.o fdio.o split.o custbaud.o termios2.o custbaud_bsd.o
|
||||
picocom : $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
|
||||
|
||||
@ -59,6 +59,7 @@ split.o : split.c split.h
|
||||
fdio.o : fdio.c fdio.h
|
||||
termios2.o : termios2.c termios2.h termbits2.h custbaud.h
|
||||
custbaud_bsd.o : custbaud_bsd.c custbaud_bsd.h custbaud.h
|
||||
custbaud.o : custbaud.c custbaud.h
|
||||
|
||||
.c.o :
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
|
||||
@ -90,7 +91,7 @@ picocom.1.pdf : picocom.1
|
||||
clean:
|
||||
rm -f picocom.o term.o fdio.o split.o
|
||||
rm -f linenoise-1.0/linenoise.o
|
||||
rm -f termios2.o custbaud_bsd.o
|
||||
rm -f custbaud.o termios2.o custbaud_bsd.o
|
||||
rm -f *~
|
||||
rm -f \#*\#
|
||||
|
||||
|
Reference in New Issue
Block a user