Another trivial code readability comment: I see 24 references to this in the code, 20 of which pass 0, and 4 of which pass 1,000,000 as the parameter.
Passing 0 defaults to a baud of 115200. The baud determines the qlen, which is 4096 for 115200 and 8192 for anything larger, so all it is doing now is selecting between two buffer sizes via magic number parameters. It would probably be appropriate today to just always use 8192 and not even take a parameter; it doesn't look like the selection between the two is done in a rigorous way. There is also a comment in umodem.c that has an outdated assumption: /* * These are the maximum number of bytes transferred per frame. * Buffers are this large to deal with high speed wireless devices. * Capped at 1024 as ttymalloc() is limited to this amount. */ #define UMODEMIBUFSIZE 1024 #define UMODEMOBUFSIZE 1024