Skip to contentSkip to conversation

I have a patch for dosemu-1.0.2.1 to enhance rs232 "break" support

DISCUSSION Stas Sergeev 1 participant 1 message Aug 23, 2002

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 3 lines · Mark Rejhon
Quoted 2 lines · Randy Thelen

Hi Mark! My name is Randy Thelen and I've hacked on src/base/serial/ser_ports.c for dosemu-1.0.2.1.

Please consider hacking >=1.1.3.2 as the serial code was changed a bit.

Quoted 1 line

+ * This function updates the msr and mcr with respect to the hardware.

Are you sure we need this for mcr?
And for msr we have a modstat_engine()... So please provide some more explanations as currently I don't see a point (yes, as the serial code is no longer maintained, you'll have to provide some more explanations than expected for makeing a maintainer to understand).

Quoted 1 line

+ if ((com[num].LSR & 1) == 0) sleep(1);

What is this?

Quoted 3 lines

put_lcr(int num, int val)
{
+ int changed;

I think you don't need "changed" here, "val" must work.

Review

Quoted 3 lines
(quoted diff) +3 -0
+    control = 0;  /* UNUSED for TIOCSBRK and TIOCCBRK */
+    if (val & UART_LCR_SBC)
+      ioctl(com[num].fd, TIOCSBRK, &control);

Will the ioctl(com[num].fd, TIOCSBRK) work? I think this ioctl doesn't require an arg at all.