noexec: set comm field for noexecs
[oweals/busybox.git] / miscutils / microcom.c
index dfc9771d8b9dd2794aaae910386d00093ddf0a24..f382edebb0c7f4792a368108a7b40f14fc75d3f8 100644 (file)
@@ -7,6 +7,15 @@
  *
  * Licensed under GPLv2, see file LICENSE in this source tree.
  */
+//config:config MICROCOM
+//config:      bool "microcom (5.6 kb)"
+//config:      default y
+//config:      help
+//config:      The poor man's minicom utility for chatting with serial port devices.
+
+//applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_MICROCOM) += microcom.o
 
 //usage:#define microcom_trivial_usage
 //usage:       "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
@@ -24,6 +33,7 @@
 // set raw tty mode
 static void xget1(int fd, struct termios *t, struct termios *oldt)
 {
+//TODO: use set_termios_to_raw()
        tcgetattr(fd, oldt);
        *t = *oldt;
        cfmakeraw(t);
@@ -64,6 +74,7 @@ int microcom_main(int argc UNUSED_PARAM, char **argv)
        unsigned opts;
 
        // fetch options
+       opt_complementary = "=1";
        opts = getopt32(argv, "Xs:+d:+t:+", &speed, &delay, &timeout);
 //     argc -= optind;
        argv += optind;