X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=reg_orion.c;h=b3985b850a5f8b36814ca1cdd211df7e08566e70;hb=3cdf178c314af7b43428f523118d80ab17c6cfde;hp=d6938ef30dca1810040a0c00f65a9293d8141cfc;hpb=42336b017ba010d03c1db3c28c8549e5d97a1cd9;p=debian%2Fgcpegg diff --git a/reg_orion.c b/reg_orion.c index d6938ef..b3985b8 100644 --- a/reg_orion.c +++ b/reg_orion.c @@ -97,7 +97,7 @@ static int32 OpenDev(DevOpts *opts) { sprintf(ttydev, "/dev/term/%c", 'a' + (opts->port - 1)); #endif #else - sprintf(ttydev, "/dev/ttyS%d", opts->port); + sprintf(ttydev, "/dev/REG", opts->port); #endif switch(opts->baud) { @@ -111,11 +111,11 @@ static int32 OpenDev(DevOpts *opts) { case 115200: baudcon = B115200; break; #endif default: - printf("%s: Baud rate %ld not supported.\n", pgmname, opts->baud); + printf("%s: Baud rate %d not supported.\n", pgmname, opts->baud); return -1; } - fprintf(stderr, "Opening %s at %ld\n", ttydev, opts->baud); + fprintf(stderr, "Opening %s at %d\n", ttydev, opts->baud); if ((TTY_fd = open(ttydev, O_RDONLY #ifdef CPU_BOUND | O_NDELAY @@ -147,7 +147,9 @@ fprintf(stderr, "Error in open(%s)\n", ttydev); #else res = cfsetospeed(&tt, baudcon); cfmakeraw(&tt); +#if !defined(__FreeBSD_kernel__) tt.c_oflag &= (~(TABDLY | ONLCR)); +#endif #endif res = tcsetattr(TTY_fd, TCSANOW, &tt);