ok i've tracked the problem down. i've tracked the problem to the drivers/char/n_tty.c file. the usb-serial(as well as the acm and other psuedo serial devices which explains the hylafax and getty issues) seems to be using the:
/*
* opost_block --- to speed up block console writes, among other
* things.
*/
static ssize_t opost_block(struct tty_struct * tty,
const unsigned char * inbuf, unsigned int nr) for (i = 0, cp = buf; i < nr; i++, cp++) {
switch (*cp) {
case '\n':
if (O_ONLRET(tty))
tty->column = 0;
if (O_ONLCR(tty))
goto break_out;
tty->canon_column = tty->column;
break;
case '\r':
if (O_ONOCR(tty) && tty->column == 0)
goto break_out;
if (O_OCRNL(tty)) {
*cp = '\n';
if (O_ONLRET(tty))
tty->canon_column = tty->column = 0;
break;
}if you'll notice there is a provision for processing a OCRNL by adding a \n into the output.there is a provision for ONLCR as well, however it doesn't add the \r. this is proper behavior for the console but not for a serial device. note in the same file the function:
/* * Perform OPOST processing. Returns -1 when the output device is * full and the character must be retried. */ static int opost(unsigned char c, struct tty_struct *tty)
if (O_OPOST(tty)) {
switch (c) {
case '\n':
if (O_ONLRET(tty))
tty->column = 0;
if (O_ONLCR(tty)) {
if (space < 2)
return -1;
tty->driver.put_char(tty, '\r');
tty->column = 0;
}
tty->canon_column = tty->column;
break;
case '\r':
if (O_ONOCR(tty) && tty->column == 0)
return 0;
if (O_OCRNL(tty)) {
c = '\n';
if (O_ONLRET(tty))
tty->canon_column = tty->column = 0;
break;
}which implements the correct translation. with this in mind i modified the opost_block just as a test, and yes this works. all functions such as echo and cat work properly. however this does create a problem for console. so the question is.......why is the opost_block and not the opost being used?
thanks dave
------------------------------------------------------- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
