#ifdef ONLCR
| ONLCR
#endif
- | OCRNL | ONOCR | ONLRET);
+#ifdef OCRNL
+ | OCRNL
+#endif
+#ifdef ONOCR
+ | ONOCR
+#endif
+#ifdef ONLRET
+ | ONLRET
+#endif
+ );
options.c_cc[VMIN] = 1;
options.c_cc[VTIME] = 0;
if (serial->fd < 0)
return "Unable to open serial port";
+ cloexec(serial->fd);
+
err = serial_configure(serial, cfg);
if (err)
return err;
serial_provide_logctx,
serial_unthrottle,
serial_cfg_info,
- 1
+ "serial",
+ PROT_SERIAL,
+ 0
};